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
David Kastrup <dak@gnu.org>
Date
Jul 29, 2007, 11:33 UTC
Message-ID
<85bqdvxx4o.fsf@lola.goethe.zz>
In-Reply-To
<Pine.LNX.4.64.0707291214060.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 10 quoted lines
>>  	}
>>  	rev.diffopt.allow_external = 1;
>> +	rev.diffopt.recursive = 1;
>
> How about
>
> 	if (!rev.diffopt.quiet)
> 		rev.diffopt.recursive = 1;
>
> instead?

I think that the optimization "don't descend if we can figure this out at the top level" should be rather implemented at the program flow level than in the option processing, and quietness does not actually play into this: _any_ diff operation can skip trees with identical top-level SHA1.

So the above optimization should not cause a performance difference (if it does, this is better fixed elsewhere), and makes it obscure to guess the "-q" behavior which should be more or less equivalent to --exit-status >/dev/null

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Previous: Johannes SchindelinNext: Jeff King
Message 11 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.