Breaks on branches #9

Open
shigesada opened this Issue Mar 7, 2012 · 1 comment

Projects

None yet

2 participants

@shigesada

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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment