-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Git Synchronize Changes No Longer Gets Tags #48211
Comments
(Experimental duplicate detection) |
Looks like this is indeed connected to #44802 Just tested this locally by creating a tag on a local repo, and then running both of them:
git pull
|
I checked my understanding on the Git mailing list (message here) and the reply makes it clear that "git pull origin master" will not fetch tags by default. This is a regression - can we please revert? |
Oh that's a sad consequence. Workaround for now is to run Using |
"git pull origin master --tags" does it for me. |
@andrewducker - me too. I'm using Git version 2.12.2.windows.2. But, the I don't see any documented flags in git pull that will pull tags without invoking fetch though. |
Oh nice, I actually searched for it and also failed to see it documented. I'd just add it, what do you guys think? |
Ideally the flag is just an omission from the docs, but is available on all platforms. I've only got access to Windows here. @andrewducker is a colleague - he's just asked the git mailing list this point. |
I checked with the Git mailing list again and got this response. Looks like it will work, because "git pull --tags" calls "git fetch" with the "--tags" parameter. I think it's worth reading the discussion. And I think that adding "--tags" will fix our use case. Although the people on the Git mailing list seem confused as to why you aren't just using "git pull" as VSCode used to. |
@andrewducker I posted that. To clarify I can guess what VSCode might be trying to do here, but am reluctant to give advice about what it should do without some context about why it made the switch. But it's relevant to point out that |
@avar The change was made in #44802 - (in case that wasn't entirely clear), where @joaomoreno said that it was to avoid situations like this. Hopefully having both of you here will make it clear what the correct way forward is :-) |
@joaomoreno Any thoughts on the solution here? |
I'll just add |
Thanks. Sounds like this is an improvement for minimal cost for most situations. With the odd pathological behaviors @avar situation no worse off than before version 1.22.1 (using just |
Issue Type: Bug
Impact Summary
Git 'Synchronize Changes' in VSCode 1.22.1 & 1.22.2 no longer gets tags from the remote repository.
Get Tags again by:
git fetch
in the VSCode terminal.Steps
Run code 1.22.2 with --disable-extensions
Synchronize Changes
or Source Control pane,...
,Sync
.git pull origin master
, i.e in generalgit pull <repository> <refspec>
Run code 1.22.1 with --disable-extensions
Synchronize Changes
or Source Control pane,...
,Sync
.git pull
.Git Behaviour
My assumption is this is caused by a switch from using
git pull
togit pull <repository> <refspec>
in 1.22.1+.This assumption appears to be backed up by Git docs at https://git-scm.com/docs/git-pull
Incorporates changes from a remote repository into the current branch. In its default mode,
git pull
is shorthand forgit fetch
followed bygit merge FETCH_HEAD
.VS Code version: Code 1.22.2 (3aeede7, 2018-04-12T16:38:45.278Z)
OS version: Windows_NT x64 6.1.7601
System Info
The text was updated successfully, but these errors were encountered: