Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

remote.origin.fetch is limited to the default branch #664

Open
@zedtux

Description

@zedtux

Subject of the issue

Given I clone a git repository using git on my local machine, so without this lib, theremote.origin.fetch targets+refs/heads/*:refs/remotes/origin/* while when I clone the same repo but with this lib the theremote.origin.fetch targets+refs/heads/master:refs/remotes/origin/master.

This makes thefetch method not being able to retrieve other branches references and therefore thereset_hard method to fail with:

fatal: ambiguous argument 'origin/8-missing-reference-language-translation-files-in-yml': unknown revision or path not in the working tree.

Your environment

  • version of git:2.32.6
  • version of ruby-git:1.18.0
  • version of ruby:2.7.6

Steps to reproduce

git=Git.clone(URL,destination)# Supposed to retrieve all the remote branch refs, but is notgit.remote(Git::GIT_REMOTE_NAME).fetch# Switches to the desired branchgit.branch('8-missing-reference-language-translation-files-in-yml').checkout# Here we want to be fully aligned with the remote branchgit.reset_hard("#{Git::GIT_REMOTE_NAME}/8-missing-reference-language-translation-files-in-yml")#=> fatal: ambiguous argument 'origin/8-missing-reference-language-translation-files-in-yml': unknown revision or path not in the working tree.

Expected behaviour

Theremote.origin.fetch should be changed from:

remote.origin.fetch=+refs/heads/master:refs/remotes/origin/master

to:

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

Actual behaviour

See "Steps to reproduce"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp