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

Re: [PATCH 8/9 v13] difftool: teach difftool to handle directory diffs

From
Tim Henigan <tim.henigan@gmail.com>
Date
Apr 19, 2012, 17:11 UTC
Message-ID
<CAFouetg6T1pgAiTfyAeSxseR-k_omsZDfqv8X8AifekwPLoE2g@mail.gmail.com>
In-Reply-To
<7v8vhsltk3.fsf@alter.siamese.dyndns.org>
On Wed, Apr 18, 2012 at 3:38 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Tim Henigan <tim.henigan@gmail.com> writes:
>
>> For now, would you object to an updated patch that simply detects and
>> ignores options that change the output of 'git diff --raw'?
>
> As a script that uses 'git diff' is a short-term hack anyway, I think the
> most cost effective thing to do is to add '--no-renames' at the end and be
> done with it.

Adding '--no-renames' has no effect if the user specifies '-C -C' or '--find-copies-harder'. Is protecting for these cases too paranoid?

Also, the '--cc' option for viewing merge diffs is not affected by '--no-renames'.

I have a revised patch that prunes out all of the above and warns the user when it does so [1].

However, it also prunes them when difftool is called in serial diff mode (i.e. non --dir-diff). Before, if 'difftool --find-[renames|copies]' was called it would open the external tool to compare the two files, but the original file name was used for both sides of the diff.

This seems confusing, but I don't know if people rely on that behavior. If we need to keep that behavior in the serial diff mode, I will need to modify the patch again to only prune the options in directory diff mode.

[1]: https://github.com/thenigan/git/commit/c3479940a36f3c7c8fe360bc244303b125f711ff
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 14 in “difftool: teach difftool to handle directory diffs”
  1. 8/9 difftool: teach difftool to handle directory diffsTim Henigan, Apr 13, 2012
  2. David AguilarApr 15, 2012
  3. David AguilarApr 16, 2012
  4. David AguilarApr 16, 2012
  5. Tim HeniganApr 17, 2012
  6. David AguilarApr 18, 2012
  7. Tim HeniganApr 18, 2012
  8. Junio C HamanoApr 18, 2012
  9. Tim HeniganApr 18, 2012
  10. Junio C HamanoApr 18, 2012
  11. Tim HeniganApr 19, 2012
  12. Junio C HamanoApr 19, 2012
  13. David AguilarApr 20, 2012
  14. Tim HeniganApr 20, 2012

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.