{"thread":{"id":"39367","subject":"identical hashes on two branches, but holes in git log","startedAt":"2015-05-19T13:29:58Z","lastAt":"2015-05-21T20:37:57Z","messageCount":15,"participants":["Philippe De Muyter","Junio C Hamano","Jeff King","Christian Couder","John Keeping","Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"261549","messageId":"20150519132958.GA21130@frolo.macqel","threadId":"39367","inReplyTo":null,"subject":"identical hashes on two branches, but holes in git log","fromName":"Philippe De Muyter","fromEmail":"phdm@macq.eu","sentAt":"2015-05-19T13:29:58Z","receivedAt":"2015-05-19T13:29:58Z","isPatch":false,"sender":{"key":"phdm@macq.eu","avatar":null},"body":"Hello,\n\nI work on the linux kernel sources (with origin = linux-stable) and I\nhave my local branch (the one with my local patches) supposedly based\non v3.14.  But actually if I invoke \"git diff v3.14\", I get much more\ndiffs than my own patches.\n\nTrying to understand, I have eventually done \"git log\" on my branch and\non v3.15 with the following commands :\n\ngit log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\ngit log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n\nI compare then the two histories with\n\ndiff -u /tmp/3.15.commits /tmp/mybranch.commits\n\nand I get (excerpt) :\n\n--- /tmp/3.15.commits      2015-05-19 13:19:59.665205514 +0200\n+++ /tmp/mybranch.commits     2015-05-19 13:19:52.452081328 +0200\n@@ -1,3780 +1,84 @@\n-commit 1860e379875dfe7271c649058aeddffe5afd9d0d (tag: v3.15)\n-commit ...\n...\n-commit fad01e866afdbe01a1f3ec06a39c3a8b9e197014 (tag: v3.15-rc8)\n...\n...\n-commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (tag: v3.15-rc1)\n...\n-commit 57673c2b0baa900dddae3b9eb3d7748ebf550eb3\n+commit a1fb433346cb5733945b5fc243f7334744bae4fd (HEAD, macq_boards-3.14.0)\n+commit ...\n...\n+commit 2be7b20bbb337e0031e0f0d39c9a4845b6bbf3b8\n commit 455c6fdbd219161bd09b1165f11699d6d73de11c (tag: v3.14)\t==== identical commit\n-commit c32fc9c803f8ed90a7548810de48ca33a3020168\t\t==== commit missing in my branch\n commit fedc1ed0f11be666de066b0c78443254736a942e\t\t==== more identical commits\n commit 01358e562a8b97f50ec04025c009c71508e6d373\n commit 915ac4e26ef9c39a0f831e935509243732abedc0\n@@ -3784,4289 +88,252 @@\n commit 0b1b901b5a98bb36943d10820efc796f7cd45ff3\n commit 1d6a32acd70ab18499829c0a9a5dbe2bace72a13\n commit 0818bf27c05b2de56c5b2bd08cfae2a939bd5f52\n-commit 877e1f1529a5c4fcc8460c1317c753ff8a6874c5\t\t==== more missing commits\n-commit 57918dfadf717acf7d0488d5970c56a282d0aad1\n-commit 86ea5e6b793d45fa7d2aa504ac3aefc813f0fd55\n-commit a5dde0c72ccbb0f66b3491ee83f4c579aea0651d\n-commit c7f6ee264b511d8a35063e9821cf36ad18e4e4fd\n...\n-commit c99abc8b39d8281dad04d771bb7a2de36fec4d9f\n commit b098d6726bbfb94c06d6e1097466187afddae61f (tag: v3.14-rc8) ==== more identical commits\n commit 822316461b15e0207e50ff661f9cf830af116e9f\n commit 56f1f4b24e8787d7ba794dbe2e949d504c054892\n...\n\nHow is that possible (to have the same commit, with the same hash but\ndifferent ancestors), and how can I recover from that situation ?\n\nI really would like to rebase my branch on v3.14, but it says it is already !\n\nI have also done a 'git fsck'.  It has shown only \n\nChecking object directories: 100% (256/256), done.                                                                                         \nChecking objects: 100% (4566799/4566799), done.                                                                                            \nChecking connectivity: 4494119, done\ndangling tree ...\ndangling commit ...\ndangling blob ...\n\nThis is with git version 1.7.10.4\n\nTIA\n\nPhilippe\n\n-- \nPhilippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles\n"},{"id":"261559","messageId":"xmqq617oa75l.fsf@gitster.dls.corp.google.com","threadId":"39367","inReplyTo":"20150519132958.GA21130@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-19T16:01:10Z","receivedAt":"2015-05-19T16:01:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philippe De Muyter <phdm@macq.eu> writes:\n\n> Trying to understand, I have eventually done \"git log\" on my branch and\n> on v3.15 with the following commands :\n>\n> git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\n> git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n\nEither\n\n    git log --oneline v3.15..HEAD ;# show what I have not in theirs\n\nor\n\n    gitk v3.15...HEAD ;# show our differences graphically\n\nmay give you a better picture than what you did, which was to\nartificially flatten the topology and lose the crucial information\nas to which commit is the parents of which other commit.\n"},{"id":"261605","messageId":"20150519214719.GA12732@frolo.macqel","threadId":"39367","inReplyTo":"xmqq617oa75l.fsf@gitster.dls.corp.google.com","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Philippe De Muyter","fromEmail":"phdm@macq.eu","sentAt":"2015-05-19T21:47:20Z","receivedAt":"2015-05-19T21:47:20Z","isPatch":false,"sender":{"key":"phdm@macq.eu","avatar":null},"body":"On Tue, May 19, 2015 at 09:01:10AM -0700, Junio C Hamano wrote:\n> Philippe De Muyter <phdm@macq.eu> writes:\n> \n> > Trying to understand, I have eventually done \"git log\" on my branch and\n> > on v3.15 with the following commands :\n> >\n> > git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\n> > git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n> \n> Either\n> \n>     git log --oneline v3.15..HEAD ;# show what I have not in theirs\n> \n> or\n> \n>     gitk v3.15...HEAD ;# show our differences graphically\n\nThis shows the commits in my branch starting from the most recent common point,\nthus my commits, but I see differences in the files not explained by my commits,\nbut by the fact that many older commits (between v3.13 and v3.14) are missing on\nmy branch, but still in both branches I have a commit called v3.14 with the\nsame hash.  Is that normal ?\n\nPhilippe\n"},{"id":"261611","messageId":"xmqqiobop67k.fsf@gitster.dls.corp.google.com","threadId":"39367","inReplyTo":"20150519214719.GA12732@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-19T22:12:31Z","receivedAt":"2015-05-19T22:12:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philippe De Muyter <phdm@macq.eu> writes:\n\n> On Tue, May 19, 2015 at 09:01:10AM -0700, Junio C Hamano wrote:\n>> Philippe De Muyter <phdm@macq.eu> writes:\n>> \n>> > Trying to understand, I have eventually done \"git log\" on my branch and\n>> > on v3.15 with the following commands :\n>> >\n>> > git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\n>> > git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n>> \n>> Either\n>> \n>>     git log --oneline v3.15..HEAD ;# show what I have not in theirs\n>> \n>> or\n>> \n>>     gitk v3.15...HEAD ;# show our differences graphically\n>\n> This shows the commits in my branch starting from the most recent common point,\n> thus my commits, but I see differences in the files not explained by my commits,\n> but by the fact that many older commits (between v3.13 and v3.14) are missing on\n> my branch, but still in both branches I have a commit called v3.14 with the\n> same hash.  Is that normal ?\n\nSorry, cannot parse.  Neither of the above would show files, so just\nabout the place where you start talking about \"I see differences in\nthe files\", you lost me.\n"},{"id":"261626","messageId":"20150519233925.GA22748@peff.net","threadId":"39367","inReplyTo":"20150519132958.GA21130@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-19T23:39:25Z","receivedAt":"2015-05-19T23:39:25Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, May 19, 2015 at 03:29:58PM +0200, Philippe De Muyter wrote:\n\n> Trying to understand, I have eventually done \"git log\" on my branch and\n> on v3.15 with the following commands :\n> \n> git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\n> git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n> \n> I compare then the two histories with\n> \n> diff -u /tmp/3.15.commits /tmp/mybranch.commits\n> \n> and I get (excerpt) :\n> \n> --- /tmp/3.15.commits      2015-05-19 13:19:59.665205514 +0200\n> +++ /tmp/mybranch.commits     2015-05-19 13:19:52.452081328 +0200\n> @@ -1,3780 +1,84 @@\n> -commit 1860e379875dfe7271c649058aeddffe5afd9d0d (tag: v3.15)\n> -commit ...\n> ...\n> -commit fad01e866afdbe01a1f3ec06a39c3a8b9e197014 (tag: v3.15-rc8)\n> ...\n> ...\n> -commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (tag: v3.15-rc1)\n> ...\n> -commit 57673c2b0baa900dddae3b9eb3d7748ebf550eb3\n> +commit a1fb433346cb5733945b5fc243f7334744bae4fd (HEAD, macq_boards-3.14.0)\n> +commit ...\n> ...\n> +commit 2be7b20bbb337e0031e0f0d39c9a4845b6bbf3b8\n\nIt looks like v3.15 is ahead of your branch. And I _think_ your question\nis: since they both contain v3.14, shouldn't they also contain all of\nthe ancestors of v3.14?\n\nThe answer is yes. But from your output here:\n\n>  commit 455c6fdbd219161bd09b1165f11699d6d73de11c (tag: v3.14)\t==== identical commit\n> -commit c32fc9c803f8ed90a7548810de48ca33a3020168\t\t==== commit missing in my branch\n>  commit fedc1ed0f11be666de066b0c78443254736a942e\t\t==== more identical commits\n\nI think what you are saying is: c32fc9c803 comes after v3.14, so it\nshould be an ancestor, right?\n\nAnd the answer is no. Git's traversal order does not necessarily reflect\nthe true topology if you have multiple lines of development. And in this\ncase, they do not have a direct ancestry relationship (i.e., they are on\nseparate branches, and neither is an ancestor of the other).\n\n-Peff\n"},{"id":"261640","messageId":"CAP8UFD2jvJy9VBp_YKnnQ4z-uM4kVqJmxTQq=FAEe=RpS5-_tg@mail.gmail.com","threadId":"39367","inReplyTo":"20150519214719.GA12732@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2015-05-20T07:39:14Z","receivedAt":"2015-05-20T07:39:14Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tue, May 19, 2015 at 11:47 PM, Philippe De Muyter <phdm@macq.eu> wrote:\n> On Tue, May 19, 2015 at 09:01:10AM -0700, Junio C Hamano wrote:\n>> Philippe De Muyter <phdm@macq.eu> writes:\n>>\n>> > Trying to understand, I have eventually done \"git log\" on my branch and\n>> > on v3.15 with the following commands :\n>> >\n>> > git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\n>> > git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n>>\n>> Either\n>>\n>>     git log --oneline v3.15..HEAD ;# show what I have not in theirs\n>>\n>> or\n>>\n>>     gitk v3.15...HEAD ;# show our differences graphically\n>\n> This shows the commits in my branch starting from the most recent common point,\n> thus my commits, but I see differences in the files not explained by my commits,\n> but by the fact that many older commits (between v3.13 and v3.14) are missing on\n> my branch, but still in both branches I have a commit called v3.14 with the\n> same hash.  Is that normal ?\n\nAs this is the linux kernel, maybe everything you are working on is\nopen source and you can push it to a public git hosting service (like\nGitHub, BitBucket, ...), so people can have a look there or clone it\nfrom there?\n\n(And if you do that it would help when talking about differences in\nsome files, if you could tell which files and which commits, and maybe\nalso which git commands you used.)\n"},{"id":"261654","messageId":"20150520131359.GA7043@frolo.macqel","threadId":"39367","inReplyTo":"20150519233925.GA22748@peff.net","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Philippe De Muyter","fromEmail":"phdm@macq.eu","sentAt":"2015-05-20T13:13:59Z","receivedAt":"2015-05-20T13:13:59Z","isPatch":false,"sender":{"key":"phdm@macq.eu","avatar":null},"body":"Hi Jeff,\n\nOn Tue, May 19, 2015 at 07:39:25PM -0400, Jeff King wrote:\n> On Tue, May 19, 2015 at 03:29:58PM +0200, Philippe De Muyter wrote:\n> \n> > Trying to understand, I have eventually done \"git log\" on my branch and\n> > on v3.15 with the following commands :\n> > \n> > git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\n> > git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n> > \n> > I compare then the two histories with\n> > \n> > diff -u /tmp/3.15.commits /tmp/mybranch.commits\n> > \n> > and I get (excerpt) :\n> > \n> > --- /tmp/3.15.commits      2015-05-19 13:19:59.665205514 +0200\n> > +++ /tmp/mybranch.commits     2015-05-19 13:19:52.452081328 +0200\n> > @@ -1,3780 +1,84 @@\n> > -commit 1860e379875dfe7271c649058aeddffe5afd9d0d (tag: v3.15)\n> > -commit ...\n> > ...\n> > -commit fad01e866afdbe01a1f3ec06a39c3a8b9e197014 (tag: v3.15-rc8)\n> > ...\n> > ...\n> > -commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (tag: v3.15-rc1)\n> > ...\n> > -commit 57673c2b0baa900dddae3b9eb3d7748ebf550eb3\n> > +commit a1fb433346cb5733945b5fc243f7334744bae4fd (HEAD, macq_boards-3.14.0)\n> > +commit ...\n> > ...\n> > +commit 2be7b20bbb337e0031e0f0d39c9a4845b6bbf3b8\n> \n> It looks like v3.15 is ahead of your branch. And I _think_ your question\n> is: since they both contain v3.14, shouldn't they also contain all of\n> the ancestors of v3.14?\n\nThanks for understanding and clarifying my question.\n\n> \n> The answer is yes. But from your output here:\n> \n> >  commit 455c6fdbd219161bd09b1165f11699d6d73de11c (tag: v3.14)\t==== identical commit\n> > -commit c32fc9c803f8ed90a7548810de48ca33a3020168\t\t==== commit missing in my branch\n> >  commit fedc1ed0f11be666de066b0c78443254736a942e\t\t==== more identical commits\n> \n> I think what you are saying is: c32fc9c803 comes after v3.14, so it\n> should be an ancestor, right?\n> \n> And the answer is no. Git's traversal order does not necessarily reflect\n> the true topology if you have multiple lines of development. And in this\n> case, they do not have a direct ancestry relationship (i.e., they are on\n> separate branches, and neither is an ancestor of the other).\n\nThanks for the explanation.  Would that also be true (that unrelated commits\ncould come in the output) with a simple 'git log' ?\n\nMy initial problem (still unresolved/unanswered) is that some commits\nthat appeared between v3.14-rc1 and v3.14-rc2 (specifically\n817c27a128e18aed840adc295f988e1656fed7d1) are present in v3.15, but not\nin my branch.\n\nI have just checked online the v3.14 version on \n\nhttp://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/arch/arm/boot/dts/imx6qdl.dtsi \n\nand I see also the same \"problem\": the commit removing 738 lines is in the log\n817c27a128e18aed840adc295f988e1656fed7d1\n\"ARM: dts: imx6qdl: make pinctrl nodes board specific\",\nbut the v3.14 version of the file still contains the 738 removed line,\nand I see no commit restoring those lines.\n\nI do not understand why those 738 lines are still present in v3.14 although\nthey were removed between v3.14-rc1 and v3.14-rc2 :(\n\nPhilippe\n"},{"id":"261660","messageId":"20150520132534.GI10518@serenity.lan","threadId":"39367","inReplyTo":"20150520131359.GA7043@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2015-05-20T13:25:34Z","receivedAt":"2015-05-20T13:25:34Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Wed, May 20, 2015 at 03:13:59PM +0200, Philippe De Muyter wrote:\n> My initial problem (still unresolved/unanswered) is that some commits\n> that appeared between v3.14-rc1 and v3.14-rc2 (specifically\n> 817c27a128e18aed840adc295f988e1656fed7d1) are present in v3.15, but not\n> in my branch.\n> \n> I have just checked online the v3.14 version on \n> \n> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/arch/arm/boot/dts/imx6qdl.dtsi \n> \n> and I see also the same \"problem\": the commit removing 738 lines is in the log\n> 817c27a128e18aed840adc295f988e1656fed7d1\n> \"ARM: dts: imx6qdl: make pinctrl nodes board specific\",\n> but the v3.14 version of the file still contains the 738 removed line,\n> and I see no commit restoring those lines.\n> \n> I do not understand why those 738 lines are still present in v3.14 although\n> they were removed between v3.14-rc1 and v3.14-rc2 :(\n\nCommit 817c27a128e18aed840adc295f988e1656fed7d1 isn't in v3.14:\n\n$ git describe --contains 817c27a128e18aed840adc295f988e1656fed7d1\nv3.15-rc1~77^2~40^2~57\n\n$ git tag --contains 817c27a128e18aed840adc295f988e1656fed7d1\nv3.15\nv3.15-rc1\nv3.15-rc2\nv3.15-rc3\nv3.15-rc4\nv3.15-rc5\nv3.15-rc6\nv3.15-rc7\nv3.15-rc8\nv3.15.1\nv3.15.10\nv3.15.2\n[snip later tags]\n\nHowever, the commit date of 817c27a128e18aed840adc295f988e1656fed7d1 is\nbetween the dates of v3.14-rc1 and v3.14-rc2 so the default commit\nordering of `git log` will show it between those two tags.\n`--topo-order` may help but I suspect the history is too complex to\ninfer the relationship between commits without `--graph`.\n"},{"id":"261662","messageId":"20150520141238.GA13990@frolo.macqel","threadId":"39367","inReplyTo":"20150520132534.GI10518@serenity.lan","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Philippe De Muyter","fromEmail":"phdm@macq.eu","sentAt":"2015-05-20T14:12:38Z","receivedAt":"2015-05-20T14:12:38Z","isPatch":false,"sender":{"key":"phdm@macq.eu","avatar":null},"body":"Hi John,\n\nOn Wed, May 20, 2015 at 02:25:34PM +0100, John Keeping wrote:\n> On Wed, May 20, 2015 at 03:13:59PM +0200, Philippe De Muyter wrote:\n> > My initial problem (still unresolved/unanswered) is that some commits\n> > that appeared between v3.14-rc1 and v3.14-rc2 (specifically\n> > 817c27a128e18aed840adc295f988e1656fed7d1) are present in v3.15, but not\n> > in my branch.\n> > \n> > I have just checked online the v3.14 version on \n> > \n> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/arch/arm/boot/dts/imx6qdl.dtsi \n> > \n> > and I see also the same \"problem\": the commit removing 738 lines is in the log\n> > 817c27a128e18aed840adc295f988e1656fed7d1\n> > \"ARM: dts: imx6qdl: make pinctrl nodes board specific\",\n> > but the v3.14 version of the file still contains the 738 removed line,\n> > and I see no commit restoring those lines.\n> > \n> > I do not understand why those 738 lines are still present in v3.14 although\n> > they were removed between v3.14-rc1 and v3.14-rc2 :(\n> \n> Commit 817c27a128e18aed840adc295f988e1656fed7d1 isn't in v3.14:\n> \n> $ git describe --contains 817c27a128e18aed840adc295f988e1656fed7d1\n> v3.15-rc1~77^2~40^2~57\n> \n> $ git tag --contains 817c27a128e18aed840adc295f988e1656fed7d1\n> v3.15\n> v3.15-rc1\n> v3.15-rc2\n> v3.15-rc3\n> v3.15-rc4\n> v3.15-rc5\n> v3.15-rc6\n> v3.15-rc7\n> v3.15-rc8\n> v3.15.1\n> v3.15.10\n> v3.15.2\n> [snip later tags]\n> \n> However, the commit date of 817c27a128e18aed840adc295f988e1656fed7d1 is\n> between the dates of v3.14-rc1 and v3.14-rc2 so the default commit\n> ordering of `git log` will show it between those two tags.\n> `--topo-order` may help but I suspect the history is too complex to\n> infer the relationship between commits without `--graph`.\n\nOK and Thanks.  You saved me.  I began to think I was going mad or there\nwas a bug in git.\n\nAfter reading the man page of 'git log', should --topo-order not be the\ndefault log order ?\n\nPhilippe\n"},{"id":"261663","messageId":"20150520161815.GA12521@peff.net","threadId":"39367","inReplyTo":"20150520141238.GA13990@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-20T16:18:15Z","receivedAt":"2015-05-20T16:18:15Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 20, 2015 at 04:12:38PM +0200, Philippe De Muyter wrote:\n\n> After reading the man page of 'git log', should --topo-order not be the\n> default log order ?\n\nThe problem with --topo-order is that it has to traverse all of the\ncommits before starting output. So:\n\n  $ time git log | head -1\n  commit 64fb1d0e975e92e012802d371e417266d6531676\n\n  real    0m0.038s\n  user    0m0.032s\n  sys     0m0.008s\n\n  $ time git log --topo-order | head -1\n  commit 64fb1d0e975e92e012802d371e417266d6531676\n\n  real    0m4.247s\n  user    0m4.140s\n  sys     0m0.108s\n\n-Peff\n"},{"id":"261756","messageId":"20150521070523.GA8026@frolo.macqel","threadId":"39367","inReplyTo":"20150520161815.GA12521@peff.net","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Philippe De Muyter","fromEmail":"phdm@macq.eu","sentAt":"2015-05-21T07:05:23Z","receivedAt":"2015-05-21T07:05:23Z","isPatch":false,"sender":{"key":"phdm@macq.eu","avatar":null},"body":"On Wed, May 20, 2015 at 12:18:15PM -0400, Jeff King wrote:\n> On Wed, May 20, 2015 at 04:12:38PM +0200, Philippe De Muyter wrote:\n> \n> > After reading the man page of 'git log', should --topo-order not be the\n> > default log order ?\n> \n> The problem with --topo-order is that it has to traverse all of the\n> commits before starting output. So:\n> \n>   $ time git log | head -1\n>   commit 64fb1d0e975e92e012802d371e417266d6531676\n> \n>   real    0m0.038s\n>   user    0m0.032s\n>   sys     0m0.008s\n> \n>   $ time git log --topo-order | head -1\n>   commit 64fb1d0e975e92e012802d371e417266d6531676\n> \n>   real    0m4.247s\n>   user    0m4.140s\n>   sys     0m0.108s\n> \n> -Peff\n\nSo we trade correctness for speed :(\n\nIs there a way to set topo-order as the default log order via git config ?\n\nIs topo-order already implemented as starting with the default order followed\nby an ancestor check or does it switch immediately to topological sort ?\n\nPhilippe\n"},{"id":"261757","messageId":"20150521071518.GA8675@frolo.macqel","threadId":"39367","inReplyTo":"xmqqiobop67k.fsf@gitster.dls.corp.google.com","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Philippe De Muyter","fromEmail":"phdm@macq.eu","sentAt":"2015-05-21T07:15:18Z","receivedAt":"2015-05-21T07:15:18Z","isPatch":false,"sender":{"key":"phdm@macq.eu","avatar":null},"body":"On Tue, May 19, 2015 at 03:12:31PM -0700, Junio C Hamano wrote:\n> Philippe De Muyter <phdm@macq.eu> writes:\n> \n> > On Tue, May 19, 2015 at 09:01:10AM -0700, Junio C Hamano wrote:\n> >> Philippe De Muyter <phdm@macq.eu> writes:\n> >> \n> >> > Trying to understand, I have eventually done \"git log\" on my branch and\n> >> > on v3.15 with the following commands :\n> >> >\n> >> > git log v3.15 --full-history --decorate=short | grep '^commit' > /tmp/3.15.commits\n> >> > git log --full-history --decorate=short | grep '^commit' > /tmp/mybranch.commits\n> >> \n> >> Either\n> >> \n> >>     git log --oneline v3.15..HEAD ;# show what I have not in theirs\n> >> \n> >> or\n> >> \n> >>     gitk v3.15...HEAD ;# show our differences graphically\n> >\n> > This shows the commits in my branch starting from the most recent common point,\n> > thus my commits, but I see differences in the files not explained by my commits,\n> > but by the fact that many older commits (between v3.13 and v3.14) are missing on\n> > my branch, but still in both branches I have a commit called v3.14 with the\n> > same hash.  Is that normal ?\n> \n> Sorry, cannot parse.  Neither of the above would show files, so just\n> about the place where you start talking about \"I see differences in\n> the files\", you lost me.\n\nLook at the other part of the thread, with the discussion with Jeff and John\n\nThe light has come, and what I understand is:\n\n\t don't trust the default (ordering) mode of 'git log' :(\n\nI surmise this happens only when 'git merge' has been used.\n\nPhilippe\n"},{"id":"261800","messageId":"xmqq1ti9lw0u.fsf@gitster.dls.corp.google.com","threadId":"39367","inReplyTo":"20150521070523.GA8026@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-21T16:45:21Z","receivedAt":"2015-05-21T16:45:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philippe De Muyter <phdm@macq.eu> writes:\n\n> So we trade correctness for speed :(\n\nNo corretness is traded with anything else here.\n\nThere are applications where topology matters and where it doesn't.\nWhen topology really matters (e.g. drawing the graph), the caller\ncan choose to use --topo-order to have git do the work.  Of course\nthe caller could accept output without --topo-order in streaming\nfashion and stitch the parent-child relationship itself.\n\nAnd of course, in applications where topology does not matter, you\ndo not have to wait.\n\nThat is called \"choice\", not \"trading\".\n"},{"id":"261842","messageId":"B2DD947EDB314A2C878567932ECB974E@PhilipOakley","threadId":"39367","inReplyTo":"20150521071518.GA8675@frolo.macqel","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2015-05-21T19:58:35Z","receivedAt":"2015-05-21T19:58:35Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Philippe De Muyter\" <phdm@macq.eu>\nTo: \"Junio C Hamano\" <gitster@pobox.com>\nCc: <git@vger.kernel.org>; \"Jeff King\" <peff@peff.net>; \"John Keeping\" \n<john@keeping.me.uk>\nSent: Thursday, May 21, 2015 8:15 AM\nSubject: Re: identical hashes on two branches, but holes in git log\n\n\n> On Tue, May 19, 2015 at 03:12:31PM -0700, Junio C Hamano wrote:\n>> Philippe De Muyter <phdm@macq.eu> writes:\n>>\n>> > On Tue, May 19, 2015 at 09:01:10AM -0700, Junio C Hamano wrote:\n>> >> Philippe De Muyter <phdm@macq.eu> writes:\n>> >>\n>> >> > Trying to understand, I have eventually done \"git log\" on my \n>> >> > branch and\n>> >> > on v3.15 with the following commands :\n>> >> >\n>> >> > git log v3.15 --full-history --decorate=short | grep '^commit' > \n>> >> > /tmp/3.15.commits\n>> >> > git log --full-history --decorate=short | grep '^commit' > \n>> >> > /tmp/mybranch.commits\n>> >>\n>> >> Either\n>> >>\n>> >>     git log --oneline v3.15..HEAD ;# show what I have not in \n>> >> theirs\n>> >>\n>> >> or\n>> >>\n>> >>     gitk v3.15...HEAD ;# show our differences graphically\n>> >\n>> > This shows the commits in my branch starting from the most recent \n>> > common point,\n>> > thus my commits, but I see differences in the files not explained \n>> > by my commits,\n>> > but by the fact that many older commits (between v3.13 and v3.14) \n>> > are missing on\n>> > my branch, but still in both branches I have a commit called v3.14 \n>> > with the\n>> > same hash.  Is that normal ?\n>>\n>> Sorry, cannot parse.  Neither of the above would show files, so just\n>> about the place where you start talking about \"I see differences in\n>> the files\", you lost me.\n>\n> Look at the other part of the thread, with the discussion with Jeff \n> and John\n>\n> The light has come, and what I understand is:\n>\n> don't trust the default (ordering) mode of 'git log' :(\n\n\nSurely the question now should be \"What should the man page say that \nwould have explained the default ordering mode in an understandable way, \nrather than the current misunderstanding?\".\n\nWhat 'ordering' were you 'trusting' (presuming) anyway? The current \ndefault mode doesn't actually say anything about the order anyway (as \nyou've discovered).\n\n>\n> I surmise this happens only when 'git merge' has been used.\n>\n--\nPhilip \n"},{"id":"261849","messageId":"20150521203757.GA2711@frolo.macqel","threadId":"39367","inReplyTo":"B2DD947EDB314A2C878567932ECB974E@PhilipOakley","subject":"Re: identical hashes on two branches, but holes in git log","fromName":"Philippe De Muyter","fromEmail":"phdm@macq.eu","sentAt":"2015-05-21T20:37:57Z","receivedAt":"2015-05-21T20:37:57Z","isPatch":false,"sender":{"key":"phdm@macq.eu","avatar":null},"body":"On Thu, May 21, 2015 at 08:58:35PM +0100, Philip Oakley wrote:\n> From: \"Philippe De Muyter\" <phdm@macq.eu>\n> To: \"Junio C Hamano\" <gitster@pobox.com>\n> Cc: <git@vger.kernel.org>; \"Jeff King\" <peff@peff.net>; \"John Keeping\" \n> <john@keeping.me.uk>\n> Sent: Thursday, May 21, 2015 8:15 AM\n> Subject: Re: identical hashes on two branches, but holes in git log\n>\n>\n>> On Tue, May 19, 2015 at 03:12:31PM -0700, Junio C Hamano wrote:\n>>> Philippe De Muyter <phdm@macq.eu> writes:\n>>>\n>>> > On Tue, May 19, 2015 at 09:01:10AM -0700, Junio C Hamano wrote:\n>>> >> Philippe De Muyter <phdm@macq.eu> writes:\n>>> >>\n>>> >> > Trying to understand, I have eventually done \"git log\" on my >> > \n>>> branch and\n>>> >> > on v3.15 with the following commands :\n>>> >> >\n>>> >> > git log v3.15 --full-history --decorate=short | grep '^commit' > >> \n>>> > /tmp/3.15.commits\n>>> >> > git log --full-history --decorate=short | grep '^commit' > >> > \n>>> /tmp/mybranch.commits\n>>> >>\n>>> >> Either\n>>> >>\n>>> >>     git log --oneline v3.15..HEAD ;# show what I have not in >> theirs\n>>> >>\n>>> >> or\n>>> >>\n>>> >>     gitk v3.15...HEAD ;# show our differences graphically\n>>> >\n>>> > This shows the commits in my branch starting from the most recent > \n>>> common point,\n>>> > thus my commits, but I see differences in the files not explained > by \n>>> my commits,\n>>> > but by the fact that many older commits (between v3.13 and v3.14) > are \n>>> missing on\n>>> > my branch, but still in both branches I have a commit called v3.14 > \n>>> with the\n>>> > same hash.  Is that normal ?\n>>>\n>>> Sorry, cannot parse.  Neither of the above would show files, so just\n>>> about the place where you start talking about \"I see differences in\n>>> the files\", you lost me.\n>>\n>> Look at the other part of the thread, with the discussion with Jeff and \n>> John\n>>\n>> The light has come, and what I understand is:\n>>\n>> don't trust the default (ordering) mode of 'git log' :(\n>\n>\n> Surely the question now should be \"What should the man page say that would \n> have explained the default ordering mode in an understandable way, rather \n> than the current misunderstanding?\".\n>\n> What 'ordering' were you 'trusting' (presuming) anyway? The current default \n> mode doesn't actually say anything about the order anyway (as you've \n> discovered).\n\nI have used 'git log' on the current 'master' branch of the linux kernel\nto find at which point in the history a commit - that I know is disruptive\nfor my work and that I know by name because I have seen it passing on a\nmailing list - had been applied.\n\n'git log -decorate=short' showed it happening between v3.14-rc1 and v3.14-rc2,\nbut after\n\n\tgit checkout v3.14\n\nI did not find the effects of the commit in the files that should have been\naffected by the commit.\n\nI expected at least that a commit listed between two tags on the same branch\nwas really applied to that branch between those two tags.\n\nPhilippe\n>\n>>\n>> I surmise this happens only when 'git merge' has been used.\n>>\n> --\n> Philip \n"}]}