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

Re: [PATCH] Documentation/git-diff: remove -r from --name-status example

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2007, 04:48 UTC
Message-ID
<7vbqdvolww.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<alpine.LFD.0.999.0707282119010.3442@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 20 quoted lines
>> Does anybody else find this behavior confusing? I can understand why
>> diff-tree might not recurse by default, but I wonder if porcelain like
>> git-diff should try to be a little more consistent and always recurse.
>
> I do agree.
>
> The behaviour is obviously historical, and comes from "git diff" being 
> just a shell-script wrapper around the different versions of diffing trees 
> and indexes etc.
>
> So it makes sense in that historical setting (and realizing that the 
> "HEAD<->index" and "index<->files" cases were really a totally different 
> operations), but it makes no sense in the modern world where people don't 
> even *know* about "git diff-tree", but just use "git diff" for everything.
>
> So:
>
>> Something like:
>
> Ack. Patch looks fine, makes sense, and is obviously good.

That makes it two of us. ... eh, excuse me, there is one issue I mention at the end.

> It *is* a change in behaviour, though, so I can understand if Junio 
> doesn't think it's appropriate this late in the 1.5.3 series.

One minor objection I do have is that, just as a matter of principle, in order to avoid setting precedence of making a fundamental semantics change in late -rc stage in the game, we should not swallow it. I do not mind if this were clearly a good change.

However, I think Jeff's patch always makes it recursive even when the user asks for --raw, which makes it inappropriate for inclusion whether before or after 1.5.3.

Previous: Linus TorvaldsNext: Jeff King
Message 5 of 18 in “Documentation/git-diff: remove -r from --name-status example”
  1. Documentation/git-diff: remove -r from --name-status exampleJeff King, Jul 29, 2007
  2. Linus TorvaldsJul 29, 2007
  3. Jeff KingJul 29, 2007
  4. Linus TorvaldsJul 29, 2007
  5. Junio C HamanoJul 29, 2007
  6. Jeff KingJul 29, 2007
  7. David KastrupJul 29, 2007
  8. Junio C HamanoJul 29, 2007
  9. Jeff KingJul 29, 2007
  10. Johannes SchindelinJul 29, 2007
  11. David KastrupJul 29, 2007
  12. Jeff KingJul 29, 2007
  13. Johannes SchindelinJul 29, 2007
  14. Jeff KingJul 29, 2007
  15. Johannes SchindelinJul 29, 2007
  16. Jeff KingJul 29, 2007
  17. Linus TorvaldsJul 29, 2007
  18. Jeff KingJul 29, 2007

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.