2015-06-18 15:26 GMT+02:00 John Keeping <john@xxxxxxxxxxxxx>: > [Please don't top-post on this list.] > > On Thu, Jun 18, 2015 at 03:15:38PM +0200, Florian Aspart wrote: >> 2015-06-18 14:31 GMT+02:00 Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>: >> > Florian Aspart venit, vidit, dixit 16.06.2015 16:11: >> >> Hi everyone, >> >> >> >> I created a clean filter to apply on some files before commiting them. >> >> The filter works correctly when I commit the file and is also applied >> >> when I usethe iff command line tool. >> >> However, when using difftool with meld, the filter is not applied and >> >> the different versions of the files are compared without any >> >> filtering. >> >> >> >> Is there a way to apply the clean/smudge filters when comparing the >> >> working copy of a file to the HEAD version in a gui diff tool? >> >> >> >> I'm using git version 2.4.3 under Ubuntu. >> >> >> >> Best, >> >> Florian >> > >> > Are you saying that "difftool" compares an uncleaned working tree file >> > with a cleaned blob? That would be a bug in either difftool or the way >> > we feed difftool. >> > >> yes in this case "difftool" compares an uncleaned working tree file >> with a cleaned blob. I did not try the smudge filter to see if it >> applied in difftool. >> >> I think the problem comes from the way difftool is feeded, since I >> also had this problem when setting an external tool for the diff in >> the gitconfig file. >> >> However, I'm not sure if this is a bug or it is designed to be so. >> If the external tool changes a cleaned working tree file during the >> diff, then by saving this file the result of the cleaning filter would >> also be saved in the working tree. > > How is your filter configured? Is it using a simple pattern (e.g. > "*.c") or is it using a file path? > > git-difftool uses `git checkout-index --all --prefix=$dir/` and I wonder > if the prefix means that the attribute specification does not match the > temporary file that difftool produces, so no filter is applied. It is using a simple pattern: *.ipynb filter=clean_ipynb -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html