{"thread":{"id":"21312","subject":"confusion with git diff-tree output","startedAt":"2009-10-21T17:43:40Z","lastAt":"2009-10-24T09:51:57Z","messageCount":7,"participants":["David Roundy","Jan Krüger","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"125625","messageId":"117f2cc80910211043q3a92a7b6o15464cc049ee33dc@mail.gmail.com","threadId":"21312","inReplyTo":null,"subject":"confusion with git diff-tree output","fromName":"David Roundy","fromEmail":"roundyd@physics.oregonstate.edu","sentAt":"2009-10-21T17:43:40Z","receivedAt":"2009-10-21T17:43:40Z","isPatch":false,"sender":{"key":"roundyd@physics.oregonstate.edu","avatar":"https://gravatar.com/avatar/20c6928b273bb8a1c23deb12399d0e74782ce911504ad5ee604294fc6a61940a?d=mp&s=160"},"body":"Hi all,\n\nI've been struggling with trying to figure out how to make diff-tree\noutput the actual files changed.  Below is the output when I run\ndiff-tree on a given commit.  It reports that the directory is\nmodified, rather than that a single file within that directory is\nmodified.  I can find out what *file* was modified by running\ndiff-tree -p --raw, which gives me output similar to what I expected\nfrom a plain old diff-tree.  Is there a flag that will make diff-tree\ngive this information?\n\nAs background, what I really want is --name-only, which rarely reports\nthe files modified, instead reporting the directories as modified, and\nI've been struggling to figure out what is going on.  The\ndocumentation seems to imply that the --raw diff output will report\nmodified files, and I haven't found anything indicating when it would\nreport the directories containing the modified files instead.\n\nThanks!\nDavid\n\n$ git diff-tree fd99a198222c14cf42fee82087a13467ff4a8205\nfd99a198222c14cf42fee82087a13467ff4a8205\n:040000 040000 8cdb796ea801da99c34d8f60045d8eb08fbb0e41\n66b67ea1763799c0b2ac01f6803177ca870f6544 M\tIolaus\n\n$ git diff-tree fd99a198222c14cf42fee82087a13467ff4a8205 -p --raw\nfd99a198222c14cf42fee82087a13467ff4a8205\n:100644 100644 dab4c531f3f69f08e5dc202ad8b6dfad9e8855fe\n0e3f305e641a6440bb478765dfcd089e0420c155 M\tIolaus/Lcs2.hs\n\ndiff --git a/Iolaus/Lcs2.hs b/Iolaus/Lcs2.hs\nindex dab4c53..0e3f305 100644\n--- a/Iolaus/Lcs2.hs\n+++ b/Iolaus/Lcs2.hs\n(changes cut)\n"},{"id":"125626","messageId":"20091021195103.01cef9c4@perceptron","threadId":"21312","inReplyTo":"117f2cc80910211043q3a92a7b6o15464cc049ee33dc@mail.gmail.com","subject":"Re: confusion with git diff-tree output","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2009-10-21T17:51:03Z","receivedAt":"2009-10-21T17:51:03Z","isPatch":false,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"> David Roundy <roundyd@physics.oregonstate.edu> wrote:\n\n> I've been struggling with trying to figure out how to make diff-tree\n> output the actual files changed.  Below is the output when I run\n> diff-tree on a given commit.  It reports that the directory is\n> modified, rather than that a single file within that directory is\n> modified.\n\nTree objects are recursively nested, i.e.\n\n> 66b67ea1763799c0b2ac01f6803177ca870f6544 M\tIolaus\n\nis a reference to another tree object... and since a file in that\nsubtree changed, a new tree object that contains a different file\nrecord is now referenced as \"Iolaus\".\n\nBy default git diff-tree doesn't recurse, but you can use -r for that.\nWhich is documented, I might add. ;)\n\nJan\n"},{"id":"125658","messageId":"117f2cc80910211523m5c1399aej594398fb6597e5de@mail.gmail.com","threadId":"21312","inReplyTo":"20091021195103.01cef9c4@perceptron","subject":"Re: confusion with git diff-tree output","fromName":"David Roundy","fromEmail":"roundyd@physics.oregonstate.edu","sentAt":"2009-10-21T22:23:08Z","receivedAt":"2009-10-21T22:23:08Z","isPatch":false,"sender":{"key":"roundyd@physics.oregonstate.edu","avatar":"https://gravatar.com/avatar/20c6928b273bb8a1c23deb12399d0e74782ce911504ad5ee604294fc6a61940a?d=mp&s=160"},"body":"You're right.  I figured I must be overlooking something obvious, and\nthat was it.  What surprised me was that -p implies -r, which is not\ndocumented.  Since the -p output was recursive, I incorrectly presumed\nthat this was the default.\n\nDavid\n\nOn Wed, Oct 21, 2009 at 1:51 PM, Jan Krüger <jk@jk.gs> wrote:\n> Tree objects are recursively nested, i.e.\n>\n>> 66b67ea1763799c0b2ac01f6803177ca870f6544 M    Iolaus\n>\n> is a reference to another tree object... and since a file in that\n> subtree changed, a new tree object that contains a different file\n> record is now referenced as \"Iolaus\".\n>\n> By default git diff-tree doesn't recurse, but you can use -r for that.\n> Which is documented, I might add. ;)\n"},{"id":"125663","messageId":"20091022004220.7e579547@perceptron","threadId":"21312","inReplyTo":"117f2cc80910211523m5c1399aej594398fb6597e5de@mail.gmail.com","subject":"Re: confusion with git diff-tree output","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2009-10-21T22:42:20Z","receivedAt":"2009-10-21T22:42:20Z","isPatch":false,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"> David Roundy <roundyd@physics.oregonstate.edu> wrote:\n\n> You're right.  I figured I must be overlooking something obvious, and\n> that was it.  What surprised me was that -p implies -r, which is not\n> documented.  Since the -p output was recursive, I incorrectly presumed\n> that this was the default.\n\nI suppose that's because you can't really display the diff for a\ndirectory in any meaningful way other than recursing.\n\nJan\n"},{"id":"125761","messageId":"20091023005426.GA2431@sigill.intra.peff.net","threadId":"21312","inReplyTo":"117f2cc80910211523m5c1399aej594398fb6597e5de@mail.gmail.com","subject":"Re: confusion with git diff-tree output","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-10-23T00:54:26Z","receivedAt":"2009-10-23T00:54:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 21, 2009 at 06:23:08PM -0400, David Roundy wrote:\n\n> You're right.  I figured I must be overlooking something obvious, and\n> that was it.  What surprised me was that -p implies -r, which is not\n> documented.  Since the -p output was recursive, I incorrectly presumed\n> that this was the default.\n\nIt's due to hysterical raisins:\n\n  http://article.gmane.org/gmane.comp.version-control.git/54078\n\n-Peff\n"},{"id":"125825","messageId":"7vvdi58fhw.fsf@alter.siamese.dyndns.org","threadId":"21312","inReplyTo":"20091023005426.GA2431@sigill.intra.peff.net","subject":"Re: confusion with git diff-tree output","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-24T06:36:59Z","receivedAt":"2009-10-24T06:36:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, Oct 21, 2009 at 06:23:08PM -0400, David Roundy wrote:\n>\n>> You're right.  I figured I must be overlooking something obvious, and\n>> that was it.  What surprised me was that -p implies -r, which is not\n>> documented.  Since the -p output was recursive, I incorrectly presumed\n>> that this was the default.\n>\n> It's due to hysterical raisins:\n>\n>   http://article.gmane.org/gmane.comp.version-control.git/54078\n\nJust to make sure, the Porcelain \"diff\" does recurse even with --raw \nand \"diff-tree\" doesn't for historical reasons, right?\n"},{"id":"125834","messageId":"20091024095156.GA9865@sigio.peff.net","threadId":"21312","inReplyTo":"7vvdi58fhw.fsf@alter.siamese.dyndns.org","subject":"Re: confusion with git diff-tree output","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-10-24T09:51:57Z","receivedAt":"2009-10-24T09:51:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Oct 23, 2009 at 11:36:59PM -0700, Junio C Hamano wrote:\n\n> >> You're right.  I figured I must be overlooking something obvious, and\n> >> that was it.  What surprised me was that -p implies -r, which is not\n> >> documented.  Since the -p output was recursive, I incorrectly presumed\n> >> that this was the default.\n> >\n> > It's due to hysterical raisins:\n> >\n> >   http://article.gmane.org/gmane.comp.version-control.git/54078\n> \n> Just to make sure, the Porcelain \"diff\" does recurse even with --raw \n> and \"diff-tree\" doesn't for historical reasons, right?\n\nYes, that's right (and yes, I just checked it to be double sure).\n\n-Peff\n"}]}