In contrast to githooks, clean and smudge are mere filters which are intended to directly process the file contents without being aware of any git functionality (since one may want to use native tools as cat or even gzip). But are there any environment variables or other means (other than scanning the repo for the file just getting fed with) to obtain the processed file's path?
How can a clean/smudge filter determine its data stream's file name?
571 views Asked by Tobias Kienzler At
1
The clean and smudge filters are invoked once per file, with arguments. A
%fin an argument is expanded to the file path, according to the documentation (scan down a bit inside thefiltersection).Note that the smudge filter is not invoked (or re-invoked) in some cases you might expect. This includes
git show(or so I am told; I have not tested this).