Hello, I use a combination of git attributes and a custom diff driver to ignore the changes to the generated files (that we unfortunately need to keep in our repository) from appearing in "git diff" and "git log" output, i.e.:
% cat .gitattributes
# Use a custom diff driver for bakefile generated files
# This allows ignoring them in git diff for example by doing
# $ git config diff.generated.command true
# pass --no-ext-diff to git diff to ignore the custom driver
*.sln diff=generated
*.vcproj diff=generated
*.vcxproj diff=generated
*.vcxproj.filters diff=generated
% git config diff.generated.command
echo Diff of generated file "$1" suppressed; true
This works quite nicely most of the time provided you use "--ext-diff"
with "git log", but not when showing the merges with "--cc". I.e. the
command "git log --ext-diff -p --cc" still outputs the real diff even for
the generated files, as if "--ext-diff" were not given. If I use "git log
--ext-diff -p -m", the generated files are ignored, which is nice, but the
diff for the other files becomes much more verbose and less readable and
I'd really like to combine "--ext-diff" with "--cc" if possible.
Is the current behaviour intentional? I see it with all the git versions I
tried (1.7.10, 2.1.0, 2.7.0 and v2.8.0-rc1), but I don't really see why
would it need to work like this, so I hope it's an oversight and could be
corrected.
Or is there perhaps some other way to do what I want already?
Thanks in advance for any help,
VZ
pgpQ80it63BEn.pgp
Description: PGP signature

