Re: smudge filters during checkout & crash consistency
- From
Derek Moore <derek.p.moore@gmail.com>
- Date
- Nov 12, 2014, 20:30 UTC
- Message-ID
- <CAMsgyKagoz7NU7cGuwvq61aiKc6Wq-z+w0_Fep7t9tYy90pB6w@mail.gmail.com>
- In-Reply-To
- <xmqqk33046ha.fsf@gitster.dls.corp.google.com>
> But if you then switch to B from that state, F will not even be > modified (i.e. it will keep the contents you prepared for "branch > A's instance of F").
Or: the post-commit hook used in the workaround looks up the prior
branch via @{-1}, finds all files common between @ & @{-1} that don't
share a latest commit, deletes those files and replaces them singly
with the results of git-archive using the latest commits of those
files relative to @. ("All files common between @ & @{-1}" would need
to be either all non-locally-modified files or making use of git-stash
{save,pop} to preserve local modifications.) All this assumes having
reversible $Format$ strings, so the clean filter can restore the
proper $Format$ string.Might be worth doing just so there's at least 1 accurate and maybe-fast "git rcs keywords substitution using smudge/clean filters" project on github. ;) Otherwise, users of "git-keyword-substitution" and "git-rcs-keywords" are being led astray.