Skip to content
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

Breaks on branches #9

Open
shigesada opened this issue Mar 7, 2012 · 2 comments
Open

Breaks on branches #9

shigesada opened this issue Mar 7, 2012 · 2 comments

Comments

@shigesada
Copy link

Hi, the scripts look promising but I've run into a serious bug:
When switching between branches the filter always inserts the data from the branch I am leaving. Thus the keywords will always show invalid data unless the file with keyword expansion was last edited in the same commit. Which won't be the case in any non-trivial situation. I'm using git 1.7.9 with MinGW. HTH

Regards

@kabel
Copy link

kabel commented Mar 9, 2012

That's a side effect of how the smudge filter is run. These filters rely on the currently checked out branch. When you switch a branch, the checkout is not yet complete when the smudge filter runs again. That means that the information from the branch you are changing from will be used until everything is complete and the switch is successful.

You can run git checkout HEAD after the switch to "refresh" everything.

@vitaly
Copy link

vitaly commented May 31, 2018

git checkout HEAD doesn't work. nothing is refreshed.
git 2.17.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants