git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Possible bug: --ext-diff ignored with --cc in git log

From
VZVadim Zeitlin <vz-git@zeitlins.org>
Date
Mar 9, 2016, 17:43 UTC
Message-ID
<E1adi8q-0005NJ-4G@smtp.tt-solutions.com>
 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
Next: Junio C Hamano
Message 1 of 8 in “Possible bug: --ext-diff ignored with --cc in git log”
  1. Vadim ZeitlinMar 9, 2016
  2. Junio C HamanoMar 10, 2016
  3. Re[2]: Possible bug: --ext-diff ignored with --cc in git logVadim Zeitlin, Mar 11, 2016
  4. Junio C HamanoMar 11, 2016
  5. Jeff KingMar 11, 2016
  6. Junio C HamanoMar 11, 2016
  7. Jeff KingMar 11, 2016
  8. Re[2]: Possible bug: --ext-diff ignored with --cc in git logVadim Zeitlin, Mar 12, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.