{"thread":{"id":"39829","subject":"Combined diff with name-only option","startedAt":"2015-07-10T10:39:43Z","lastAt":"2015-07-10T17:47:46Z","messageCount":2,"participants":["Janusz Białobrzewski","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"265980","messageId":"559FA0EF.2000409@biu.pl","threadId":"39829","inReplyTo":null,"subject":"Combined diff with name-only option","fromName":"Janusz Białobrzewski","fromEmail":"janusz.bialobrzewski@biu.pl","sentAt":"2015-07-10T10:39:43Z","receivedAt":"2015-07-10T10:39:43Z","isPatch":false,"sender":{"key":"janusz.bialobrzewski@biu.pl","avatar":null},"body":"Hello,\n\nWhen I run:\n\ngit diff-tree --cc 511f273b99af4529f6eb30069bb9070dc73fbbb4\n\nAs expected, I get the diff for the files that are changed in both parents.\n\nWhen I run:\n\ngit diff-tree --cc --name-only 511f273b99af4529f6eb30069bb9070dc73fbbb4\n\nI get all the files listed including ones that are changed only in one \nparent.\nI would expect to see only names of the files changed in both parents \nlike in the case when --name-only parameter was not present.\nIs it a bug or is it done by design?\n\nBR,\nJanusz.\n"},{"id":"265994","messageId":"xmqq7fq7lxa5.fsf@gitster.dls.corp.google.com","threadId":"39829","inReplyTo":"559FA0EF.2000409@biu.pl","subject":"Re: Combined diff with name-only option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-07-10T17:47:46Z","receivedAt":"2015-07-10T17:47:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Janusz Białobrzewski  <Janusz.Bialobrzewski@biu.pl> writes:\n\n> Is it a bug or is it done by design?\n\nI suspect the answer is \"no and not really\".  The truth would be\ncloser to: we didn't bother to write code in the command line parser\nto check and flag it as an error when \"--cc\" and \"--name-only\" is\ngiven together.\n\nUnlike \"-c\" that works solely on the tree level changes, \"--cc\"\nlooks into blob contents involved in the merge, but things like\n\"--name-status\", etc., do not work at blob levels (you can consider\nthat part is \"by design\").\n\nSimilarly, if you make a whitespace-only change to a file and use\n\n    git diff-tree -b -p\n\nyou will still see the name of the commit object, but no patch.\n\n    git diff-tree -b --name-only\n\nstill reports the modified paths as tree-level differences.\n"}]}