git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Combined diff with name-only option
@ 2015-07-10 10:39 Janusz Białobrzewski
  2015-07-10 17:47 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Janusz Białobrzewski @ 2015-07-10 10:39 UTC (permalink / raw)
  To: git

Hello,

When I run:

git diff-tree --cc 511f273b99af4529f6eb30069bb9070dc73fbbb4

As expected, I get the diff for the files that are changed in both parents.

When I run:

git diff-tree --cc --name-only 511f273b99af4529f6eb30069bb9070dc73fbbb4

I get all the files listed including ones that are changed only in one 
parent.
I would expect to see only names of the files changed in both parents 
like in the case when --name-only parameter was not present.
Is it a bug or is it done by design?

BR,
Janusz.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Combined diff with name-only option
  2015-07-10 10:39 Combined diff with name-only option Janusz Białobrzewski
@ 2015-07-10 17:47 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2015-07-10 17:47 UTC (permalink / raw)
  To: Janusz Białobrzewski; +Cc: git

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-10 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 10:39 Combined diff with name-only option Janusz Białobrzewski
2015-07-10 17:47 ` Junio C Hamano

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).