{"thread":{"id":"2108","subject":"Re: git-whatchanged does not show merge result?","startedAt":"2005-10-14T16:33:51Z","lastAt":"2005-10-14T18:39:30Z","messageCount":6,"participants":["David Ho","Linus Torvalds","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"10105","messageId":"4dd15d180510140933j7a730c49hb9cdaa98ea0a5b07@mail.gmail.com","threadId":"2108","inReplyTo":"4dd15d180510140929x2c69f61ag19a1409cfd993e7b@mail.gmail.com","subject":"Re: git-whatchanged does not show merge result?","fromName":"David Ho","fromEmail":"davidkwho@gmail.com","sentAt":"2005-10-14T16:33:51Z","receivedAt":"2005-10-14T16:33:51Z","isPatch":false,"sender":{"key":"davidkwho@gmail.com","avatar":"https://gravatar.com/avatar/1596ca9708bdd00a5c237f15af1011d65b6ef49a3bd9e9152e0bf09e7577fb5a?d=mp&s=160"},"body":"Hi,\n\nMaybe someone can clear up a confusion I have with git-whatchanged.\nI created a new repo with just one file hello, split out a new branch \"mybranch.\nWhen I merged back the changes from mybranch, git-whatchanged -p did\nnot should the diff of the merge.\nDoes it have some special behaviour I am not aware of.  I'd appreciate\nif you can clarify.\nNotice that git-whatchange does not show the diff between (last\ncommit) fd494be and 83ac91a1\n\nThanks, David\n\ngit version 0.99.7b\n\ncommands used (roughly to repeat the test)\n\nmkdir git-tutorial\ncd git-tutorial\ngit-init-db\necho \"Hello World\" >hello\ngit-update-index --add hello\necho \"It's a new day for git\" >>hello\necho \"Initial commit\" | git-commit-tree $(git-write-tree) > .git/HEAD\ngit -m \"added It's a new day...\" commit hello\ngit checkout -b mybranch\ngit checkout mybranch\necho \"Work, work, work\" >>hello\ngit commit -m 'Some work.' hello\ngit checkout master\necho \"Play, play, play\" >>hello\ngit commit -m 'Some fun.' hello\ngit pull . mybranch\nvi hello (merge the change by hand...)\ngit -m \"merge work,work,... from mybranch\" commit hello\n\nlast commit\n#cat .git/HEAD\nfd494becb20a8d9eddad01921de1cc9fe2cbf354\n\noutput from git-whatchanged -p hello\n\ndiff-tree 83ac91a13297887760f252aa9026e76235adcdd9 (from\n7a78a9c5bb38ad4db1b5c9b14c1d409b2f36c0b0)\nAuthor:  <davidho@penguin.nanometrics.ca>\nDate:   Fri Oct 14 12:02:50 2005 -0400\n\n    Some fun.\n\ndiff --git a/hello b/hello\n--- a/hello\n+++ b/hello\n@@ -1,2 +1,3 @@\n Hello World\n It's a new day for git\n+Play, play, play\n\ndiff-tree b12ea5026dbc9ad651fcad6b44a683548fda47a7 (from\n7a78a9c5bb38ad4db1b5c9b14c1d409b2f36c0b0)\nAuthor:  <davidho@penguin.nanometrics.ca>\nDate:   Fri Oct 14 12:02:22 2005 -0400\n\n    Some work.\n\ndiff --git a/hello b/hello\n--- a/hello\n+++ b/hello\n@@ -1,2 +1,3 @@\n Hello World\n It's a new day for git\n+Work, work, work\n\ndiff-tree 7a78a9c5bb38ad4db1b5c9b14c1d409b2f36c0b0 (from\ne45b23ab79bec72ba4ef0a79820a3c172751e59b)\nAuthor:  <davidho@penguin.nanometrics.ca>\nDate:   Fri Oct 14 12:00:48 2005 -0400\n\n    Add line \"It's a new day...\"\n\ndiff --git a/hello b/hello\n--- a/hello\n+++ b/hello\n@@ -1 +1,2 @@\n Hello World\n+It's a new day for git\n"},{"id":"10106","messageId":"Pine.LNX.4.64.0510141007290.23590@g5.osdl.org","threadId":"2108","inReplyTo":"4dd15d180510140933j7a730c49hb9cdaa98ea0a5b07@mail.gmail.com","subject":"Re: git-whatchanged does not show merge result?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-10-14T17:13:08Z","receivedAt":"2005-10-14T17:13:08Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 14 Oct 2005, David Ho wrote:\n> \n> Maybe someone can clear up a confusion I have with git-whatchanged.\n> I created a new repo with just one file hello, split out a new branch \"mybranch.\n> When I merged back the changes from mybranch, git-whatchanged -p did\n> not should the diff of the merge.\n\nYou can use the \"-m\" flag to show merges. HOWEVER, it's not very useful \nin general, although it _is_ useful on a file-by-file basis. \n\nWhat \"-m\" does is that it will show diffs against each parent, which is \n_sometimes_ what you want. Try it.\n\n\t\tLinus\n"},{"id":"10108","messageId":"7vd5m8rozb.fsf@assigned-by-dhcp.cox.net","threadId":"2108","inReplyTo":"4dd15d180510140933j7a730c49hb9cdaa98ea0a5b07@mail.gmail.com","subject":"Re: git-whatchanged does not show merge result?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-10-14T17:24:24Z","receivedAt":"2005-10-14T17:24:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Ho <davidkwho@gmail.com> writes:\n\n> When I merged back the changes from mybranch, git-whatchanged -p did\n> not should the diff of the merge.\n\nYou probably mean \"git-whatchanged -p -m\".\n\nI've seen this question asked at least twice in the past.\n\n    SYNOPSIS\n    --------\n    'git-whatchanged' <option>...\n\n    DESCRIPTION\n    -----------\n    Shows commit logs and diff output each commit introduces.  The\n    command internally invokes 'git-rev-list' piped to\n    'git-diff-tree', and takes command line options for both of\n    these commands.\n\n    This manual page describes only the most frequently used options.\n\nPerhaps the frequently used options should include '-m' as well.\nThis part is from git-diff-tree.txt:\n\n    -m::\n            By default, \"git-diff-tree --stdin\" does not show\n            differences for merge commits.  With this flag, it shows\n            differences to that commit from all of its parents.\n"},{"id":"10109","messageId":"4dd15d180510141031n531b9e0enc8e7d668b1e61b83@mail.gmail.com","threadId":"2108","inReplyTo":"Pine.LNX.4.64.0510141007290.23590@g5.osdl.org","subject":"Re: git-whatchanged does not show merge result?","fromName":"David Ho","fromEmail":"davidkwho@gmail.com","sentAt":"2005-10-14T17:31:23Z","receivedAt":"2005-10-14T17:31:23Z","isPatch":false,"sender":{"key":"davidkwho@gmail.com","avatar":"https://gravatar.com/avatar/1596ca9708bdd00a5c237f15af1011d65b6ef49a3bd9e9152e0bf09e7577fb5a?d=mp&s=160"},"body":"I was a little worried when I did git-whatchanged on a file and there\nwas a hole in the history where the merge is.  This reassured me that\nall changes to the file is accessible (I'm sure they are all stored\nsafely in the repo =).\n\nThanks, David\n\nOn 10/14/05, Linus Torvalds <torvalds@osdl.org> wrote:\n>\n>\n> On Fri, 14 Oct 2005, David Ho wrote:\n> >\n> > Maybe someone can clear up a confusion I have with git-whatchanged.\n> > I created a new repo with just one file hello, split out a new branch \"mybranch.\n> > When I merged back the changes from mybranch, git-whatchanged -p did\n> > not should the diff of the merge.\n>\n> You can use the \"-m\" flag to show merges. HOWEVER, it's not very useful\n> in general, although it _is_ useful on a file-by-file basis.\n>\n> What \"-m\" does is that it will show diffs against each parent, which is\n> _sometimes_ what you want. Try it.\n>\n>                 Linus\n>\n"},{"id":"10110","messageId":"4dd15d180510141039l12748f98x5506df855f488ce2@mail.gmail.com","threadId":"2108","inReplyTo":"7vd5m8rozb.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-whatchanged does not show merge result?","fromName":"David Ho","fromEmail":"davidkwho@gmail.com","sentAt":"2005-10-14T17:39:40Z","receivedAt":"2005-10-14T17:39:40Z","isPatch":false,"sender":{"key":"davidkwho@gmail.com","avatar":"https://gravatar.com/avatar/1596ca9708bdd00a5c237f15af1011d65b6ef49a3bd9e9152e0bf09e7577fb5a?d=mp&s=160"},"body":"Sorry, I'm still reading the man pages on\nhttp://www.kernel.org/pub/software/scm/git/docs/.\nThanks for pointing that out.\n\nDavid\n"},{"id":"10112","messageId":"Pine.LNX.4.64.0510141138030.23590@g5.osdl.org","threadId":"2108","inReplyTo":"4dd15d180510141031n531b9e0enc8e7d668b1e61b83@mail.gmail.com","subject":"Re: git-whatchanged does not show merge result?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-10-14T18:39:30Z","receivedAt":"2005-10-14T18:39:30Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 14 Oct 2005, David Ho wrote:\n>\n> I was a little worried when I did git-whatchanged on a file and there\n> was a hole in the history where the merge is.  This reassured me that\n> all changes to the file is accessible (I'm sure they are all stored\n> safely in the repo =).\n\nBtw, \"git-whatchanged\" really _can_ hide real stuff, namely when nothing \nchanged.\n\nA commit that has no changes at all (which is quite possible) will never \nbe shown by git-whatchanged. \n\nSo in many ways, \"git log\" is the way to see all commits. \n\"git-whatchanged\" is really just a way to see the _changes_, and by \ndefauly it ignores merges just because the changes are \"complicated\".\n\n\t\tLinus\n"}]}