Re: How to simulate a real checkout to test a new smudge filter?
- From
Jakub Narębski <jnareb@gmail.com>
- Date
- Sep 8, 2016, 13:12 UTC
- Message-ID
- <e17a88cd-2de7-dc84-2262-743e82d8b047@gmail.com>
- In-Reply-To
- <CAKmQUfbemaid61xPyvNheLM2jVGXGjiyF_x=NZnxkZ=5wccQ=Q@mail.gmail.com>
W dniu 06.09.2016 o 23:01, john smith pisze:
Show 15 quoted lines
> I'd prefer smudge/clean filters instead of `make' scripts etc. to > convert template dotfiles into something usable and back because > filters: > > 1. could be run automatically > > 2. do not modify files as shown by `git show HEAD:<file>' and > therefore no files are reported as modified by git status and also > there are not conflicts when merging master into work/home branch. > > I have problems because with point 1 because apparently smudge filter > is not run automatically every time when branch is changed if files > listed in .gitattributes do not change. As the last resort I could > force smudge/clean filter to run just to keep advantage specified in > point 2.
Couldn't you use post-checkout hook plus clean filter instead of clean/smudge filter pair, if the smudge part depends on the branch?
Or make post-checkout hook invoke smudge filter... though `git cat-file --filters` is not in any released version, I think...
Best,
-- Jakub Narębski