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

Re: git log vs git diff vs --name-status

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 23, 2007, 09:33 UTC
Message-ID
<7vr6lutx1p.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20070823084512.GB31174@genesis.frugalware.org>
VMiklos <vmiklos@frugalware.org> writes:
> Na Thu, Aug 23, 2007 at 10:43:15AM +0200, VMiklos <vmiklos@frugalware.org> pisal(a):
>> M       dir
>
> sorry, i needed the -r option
I know.

I've been debating myself if --name-status should imply -r (recursive behaviour) for "git log". More specifically, I think a reasonable guiding principles would be something like:

 * Anything that looks at the file contents level change (that
   is, -p, --stat and --numstat) should always imply recursive;
 * Anything that is Porcelain should always imply recursive.

I am fairly certain about the first one, but not absolutely sure about the latter. The first principle does not justify making your example to recurse, but the second, if we accept it, would.

Previous: VMiklosNext: VMiklos
Message 3 of 4 in “git log vs git diff vs --name-status”
  1. VMiklosAug 23, 2007
  2. VMiklosAug 23, 2007
  3. Junio C HamanoAug 23, 2007
  4. VMiklosAug 24, 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.