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

Re: Combined diff with name-only option

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 10, 2015, 17:47 UTC
Message-ID
<xmqq7fq7lxa5.fsf@gitster.dls.corp.google.com>
In-Reply-To
<559FA0EF.2000409@biu.pl>
Janusz Białobrzewski  <Janusz.Bialobrzewski@biu.pl> writes:
> Is it a bug or is it done by design?

I suspect the answer is "no and not really". The truth would be closer to: we didn't bother to write code in the command line parser to check and flag it as an error when "--cc" and "--name-only" is given together.

Unlike "-c" that works solely on the tree level changes, "--cc" looks into blob contents involved in the merge, but things like "--name-status", etc., do not work at blob levels (you can consider that part is "by design").

Similarly, if you make a whitespace-only change to a file and use
    git diff-tree -b -p
you will still see the name of the commit object, but no patch.
    git diff-tree -b --name-only
still reports the modified paths as tree-level differences.
Previous: Janusz Białobrzewski
Message 2 of 2 in “Combined diff with name-only option”
  1. Janusz BiałobrzewskiJul 10, 2015
  2. Junio C HamanoJul 10, 2015

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.