-
Notifications
You must be signed in to change notification settings - Fork 28.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull and Sync fails when name of tracking branch differs from name of tracked branch on remote #70136
Comments
(Experimental duplicate detection)
|
What does |
(nothing) I've here modified the answers because I don't want to make the URLs public. Maybe I should make a test with a public gist. |
Here's a repository for testing: https://github.com/md2perpe/vscode-issue-70136/tree/master In the local repository created the answers to your questions are as follows:
(nothing) |
What what's your git version? |
I use latest git for Windows.
|
@joaomoreno Have you been able to reproduce? |
Not really... If you change |
Using the command
the following was added to
The error still occurs. |
Did you follow my instructions to reproduce? |
Yup, I understand it now. The way I see us fixing this is just to remove the arguments passed to |
Issue Type: Bug
I have several branches that have another name, or rather path, in the upstream repository, e.g. local branch
foo
pushes to and fetches from branchpath/to/foo
in the upstream repository. But the tracking branch isupstream/foo
, so the tracking branch path doesn't reflect the upstream branch path.With this setup, the
git.pull
andgit.sync
commands fail with a message "Git: fatal: couldn't find remote ref foo".Studying the code, I found that the bug is either at extensions/git/src/git.ts, lines 1462 - 1470, https://github.com/Microsoft/vscode/blob/c63c97c12848e85769e717209b73110e83c18ef6/extensions/git/src/git.ts#L1462-L1470
or at extensions/git/src/repository.ts, lines 924, 944 and 1006,
https://github.com/Microsoft/vscode/blob/c63c97c12848e85769e717209b73110e83c18ef6/extensions/git/src/repository.ts#L924
https://github.com/Microsoft/vscode/blob/c63c97c12848e85769e717209b73110e83c18ef6/extensions/git/src/repository.ts#L944
https://github.com/Microsoft/vscode/blob/c63c97c12848e85769e717209b73110e83c18ef6/extensions/git/src/repository.ts#L1006
Should the
name
field in theupstream
object really be the name of the remote tracking branch? Shouldn't it be the name of the tracked branch on the remote? Or should theupstream
object contain another field storing the name of the tracked branch on the remote which then should be used at extensions/git/src/repository.ts, lines 924, 944 and 1006?VS Code version: Code 1.31.1 (1b8e830, 2019-02-12T02:20:54.427Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (55)
The text was updated successfully, but these errors were encountered: