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

Re: [PATCH] Fix several places where diff.renames in config can be problematic

From
EWEric Wong <normalperson@yhbt.net>
Date
Jul 8, 2006, 08:41 UTC
Message-ID
<20060708084121.GD29036@hand.yhbt.net>
In-Reply-To
<7vsllcr077.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 26 quoted lines
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > -my @files = safe_pipe_capture('git-diff-tree', '-r', $parent, $commit);
> > +my @files = safe_pipe_capture('git-diff-tree','--no-renames','-r',
> > +				$parent, $commit);
> 
> I changed my mind.
> 
> -- >8 --
> diff: do not use configuration magic at the core-level
> 
> The Porcelainish has become so much usable as the UI that there
> is not much reason people should be using the core programs by
> hand anymore.  At this point we are better off making the
> behaviour of the core programs predictable by keeping them
> unaffected by the configuration variables.  Otherwise they will
> become very hard to use as reliable building blocks.
> 
> For example, "git-commit -a" internally uses git-diff-files to
> figure out the set of paths that need to be updated in the
> index, and we should never allow diff.renames that happens to be
> in the configuration to interfere (or slow down the process).
> 
> The UI level configuration such as showing renamed diff and
> coloring are still honored by the Porcelainish ("git log" family
> and "git diff"), but not by the core anymore.

Full ack on this. I was ready to let my diff.renames patch drop if there were too many potential incompatibilities/breakages, but this should alleviate that.

I should work on breaking out of the habit of using git diff-{index,tree} in my day-to-day use and finally start using git diff more to save some keystrokes.

-- 
Eric Wong
Previous: Junio C HamanoNext: Eric Wong
Message 10 of 13 in “I forgot to run format-patch with the -M flag”
  1. 0/1 I forgot to run format-patch with the -M flagEric Wong, Jul 7, 2006
  2. diff.c: respect diff.renames config optionEric Wong, Jul 7, 2006
  3. builtin-log: respect diff configuration optionsEric Wong, Jul 7, 2006
  4. Junio C HamanoJul 7, 2006
  5. Junio C HamanoJul 7, 2006
  6. Junio C HamanoJul 7, 2006
  7. Junio C HamanoJul 7, 2006
  8. Fix several places where diff.renames in config can be problematicEric Wong, Jul 8, 2006
  9. Junio C HamanoJul 8, 2006
  10. Eric WongJul 8, 2006
  11. templates/hooks--update: replace diffstat calls with git diff --statEric Wong, Jul 8, 2006
  12. Junio C HamanoJul 7, 2006
  13. update Documentation/diff-options.txtJunio C Hamano, Jul 7, 2006

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.