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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 10, 2016, 22:33 UTC
Message-ID
<xmqqlh5qc698.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<E1adi8q-0005NJ-4G@smtp.tt-solutions.com>
Vadim Zeitlin <vz-git@zeitlins.org> writes:
Show 7 quoted lines
> 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. ...
> 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.

I think this is "intentional" in the sense that "--cc" feature is fundamentally and conceptually incompatible with "--ext-diff".

 - The "external diff" feature is to allow third-party tools to
   produce output that is vastly different from the usual "diff"
   output, e.g. unlike the usual "diff", the output may not even be
   line-oriented, and certainly would not have to follow the
   convention of denoting the contents on old and new lines with "-"
   and "+" prefixes.
 - The "--cc" feature is to show multiple "diff" outputs in the
   usual format with post-processing to coalesce them into a more
   concise form, and fundamentally depends on (1) the output being
   line-oriented and (2) the contents of old and new lines denoted
   by "-"/"+" prefixes to be able to do so.

I haven't tried it myself, but if the contents you are using ext-diff on can be compared in a format that is easy-to-read for humans by passing them first to "textconv" filter and then running the normal "diff" on, that may be a viable approach to do what you are trying to do, as "textconv" feature is meant to still produce the output that still follows the usual "diff" convention. Its output should be usable by any tool (e.g. diffstat) meant to post-process patch output, and would be a better match for the "--cc" mechanism.

Previous: Vadim ZeitlinNext: Vadim Zeitlin
Message 2 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.