{"thread":{"id":"1365","subject":"Fix interesting git-rev-list corner case","startedAt":"2005-07-29T22:50:30Z","lastAt":"2005-07-31T05:32:20Z","messageCount":15,"participants":["Linus Torvalds","Ryan Anderson","A Large Angry SCM","Peter Osterlund","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"6606","messageId":"Pine.LNX.4.58.0507291542060.29650@g5.osdl.org","threadId":"1365","inReplyTo":null,"subject":"Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-29T22:50:30Z","receivedAt":"2005-07-29T22:50:30Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nThis corner-case was triggered by a kernel commit that was not in date\norder, due to a misconfigured time zone that made the commit appear three\nhours older than it was.\n\nThat caused git-rev-list to traverse the commit tree in a non-obvious\norder, and made it parse several of the _parents_ of the misplaced commit\nbefore it actually parsed the commit itself. That's fine, but it meant \nthat the grandparents of the commit didn't get marked uninteresting, \nbecause they had been reached through an \"interesting\" branch.\n\nThe reason was that \"mark_parents_uninteresting()\" (which is supposed to \nmark all existing parents as being uninteresting - duh) didn't actually \ntraverse more than one level down the parent chain.\n\nNORMALLY this is fine, since with the date-based traversal order,\ngrandparents won't ever even have been looked at before their parents (so\ntraversing the chain down isn't needed, because the next time around when \nwe pick out the parent we'll mark _its_ parents uninteresting), but since \nwe'd gotten out of order, we'd already seen the parent and thus never got \naround to mark the grandparents.\n\nAnyway, the fix is simple. Just traverse parent chains recursively.  \nNormally the chain won't even exist (since the parent hasn't been parsed\nyet), so this is not actually going to trigger except in this strange \ncorner-case.\n\nAdd a comment to the simple one-liner, since this was a bit subtle, and I \nhad to really think things through to understand how it could happen.\n\nSigned-off-by: Linus Torvalds <torvalds@osdl.org>\n---\ndiff --git a/rev-list.c b/rev-list.c\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -228,6 +228,17 @@ static void mark_parents_uninteresting(s\n \t\tcommit->object.flags |= UNINTERESTING;\n \n \t\t/*\n+\t\t * Normally we haven't parsed the parent\n+\t\t * yet, so we won't have a parent of a parent\n+\t\t * here. However, it may turn out that we've\n+\t\t * reached this commit some other way (where it\n+\t\t * wasn't uninteresting), in which case we need\n+\t\t * to mark its parents recursively too..\n+\t\t */\n+\t\tif (commit->parents)\n+\t\t\tmark_parents_uninteresting(commit);\n+\n+\t\t/*\n \t\t * A missing commit is ok iff its parent is marked \n \t\t * uninteresting.\n \t\t *\n"},{"id":"6608","messageId":"20050730001158.GF32263@mythryan2.michonline.com","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507291542060.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2005-07-30T00:11:58Z","receivedAt":"2005-07-30T00:11:58Z","isPatch":false,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"On Fri, Jul 29, 2005 at 03:50:30PM -0700, Linus Torvalds wrote:\n> \n> This corner-case was triggered by a kernel commit that was not in date\n> order, due to a misconfigured time zone that made the commit appear three\n> hours older than it was.\n\nMaybe it'd make sense to have the commits refuse to add a commit when it\nwould be younger than one of it's parents?\n\nI suppose that only really fixes one direction of the other problem,\nthough.\n\n-- \n\nRyan Anderson\n  sometimes Pug Majere\n"},{"id":"6609","messageId":"42EAD301.90804@gmail.com","threadId":"1365","inReplyTo":"20050730001158.GF32263@mythryan2.michonline.com","subject":"Re: Fix interesting git-rev-list corner case","fromName":"A Large Angry SCM","fromEmail":"gitzilla@gmail.com","sentAt":"2005-07-30T01:08:17Z","receivedAt":"2005-07-30T01:08:17Z","isPatch":false,"sender":{"key":"gitzilla@gmail.com","avatar":"https://gravatar.com/avatar/354625c442439908ff3dd99757dee330e29e9df7847472384faf7a00add247fb?d=mp&s=160"},"body":"Ryan Anderson wrote:\n> Maybe it'd make sense to have the commits refuse to add a commit when it\n> would be younger than one of it's parents?\n\nBetter not to trust timestamps in distributed federations since you \ncan't guarantee any kind of accuracy across administrative boundaries.\n"},{"id":"6610","messageId":"Pine.LNX.4.58.0507291816060.29650@g5.osdl.org","threadId":"1365","inReplyTo":"20050730001158.GF32263@mythryan2.michonline.com","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-30T01:20:48Z","receivedAt":"2005-07-30T01:20:48Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 29 Jul 2005, Ryan Anderson wrote:\n> \n> Maybe it'd make sense to have the commits refuse to add a commit when it\n> would be younger than one of it's parents?\n\nNo, the git-rev-list thing really was a bug, it was just that I hadn't \nthought things through when I wrote it, and the \"normal\" case (ie the ones \nI had tested) just happened to work because it's a common one.\n\nIn other words - I had taken a shortcut without thinking it through.\n\nThe date really isn't important - the algorithm I had works fine even if \ndates are totally screwed up, it just had a stupid bug.\n\nAnd trying to make the date more important than it is will just inevitably \nlead to _worse_ problems down the road. \n\nSo the date is a good heuristic (we have to traverse the commits in _some_\norder, and the date order just happens to be one that ends up giving the\nminimum number of commits \"usually\"), but any time we _depend_ on dates\none way or the other that would be a good.\n\n\t\tLinus\n"},{"id":"6611","messageId":"Pine.LNX.4.58.0507291827000.29650@g5.osdl.org","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507291816060.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-30T01:28:47Z","receivedAt":"2005-07-30T01:28:47Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 29 Jul 2005, Linus Torvalds wrote:\n> \n>\t\t, but any time we _depend_ on dates\n> one way or the other that would be a good.\n\n\"_not_ be a good _thing_\". I don't know what strange brain-glitch I had\nthere.\n\nI had kind of hoped my kids would be all grown up before their dad started \nlosing his marbles. Oh, well..\n\n\t\t\tLinus\n"},{"id":"6630","messageId":"m31x5gob8k.fsf@telia.com","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507291542060.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Peter Osterlund","fromEmail":"petero2@telia.com","sentAt":"2005-07-30T10:10:35Z","receivedAt":"2005-07-30T10:10:35Z","isPatch":false,"sender":{"key":"petero2@telia.com","avatar":null},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> This corner-case was triggered by a kernel commit that was not in date\n> order, due to a misconfigured time zone that made the commit appear three\n> hours older than it was.\n\nI have problems pulling linux kernel changes from\n33ac02aa4cef417871e128ab4a6565e751e5f3b2 to\nb0825488a642cadcf39709961dde61440cb0731c into my local tree. At first\nI thought your patch would fix it, but it doesn't:\n\nr3000:~/git$ cat linux/.git/HEAD\nb0825488a642cadcf39709961dde61440cb0731c\nr3000:~/git$ git-clone-script -l linux linux.test\ndefaulting to local storage area\n0 blocks\nr3000:~/git$ cd linux.test/\nr3000:~/git/linux.test$ echo 33ac02aa4cef417871e128ab4a6565e751e5f3b2 >.git/HEAD\nr3000:~/git/linux.test$ git-pull-script ../linux\nPacking 291 objects\nUnpacking 291 objects\n 100% (291/291) done\nTrying to merge b0825488a642cadcf39709961dde61440cb0731c into 33ac02aa4cef417871e128ab4a6565e751e5f3b2\nSimple merge failed, trying Automatic merge\nRemoving arch/mips/vr41xx/common/giu.c\nAuto-merging arch/s390/kernel/head.S.\nAuto-merging arch/s390/kernel/head64.S.\nAuto-merging arch/um/os-Linux/elf_aux.c.\nmerge: warning: conflicts during merge\nERROR: Merge conflict in arch/um/os-Linux/elf_aux.c.\nAuto-merging arch/x86_64/kernel/smp.c.\nAuto-merging arch/x86_64/kernel/smpboot.c.\nmerge: warning: conflicts during merge\nERROR: Merge conflict in arch/x86_64/kernel/smpboot.c.\nAuto-merging drivers/i2c/busses/i2c-mpc.c.\nmerge: warning: conflicts during merge\nERROR: Merge conflict in drivers/i2c/busses/i2c-mpc.c.\nRemoving drivers/ide/cris/ide-v10.c\nRemoving drivers/media/dvb/frontends/lgdt3302.c\nRemoving drivers/media/dvb/frontends/lgdt3302.h\nRemoving drivers/media/dvb/frontends/lgdt3302_priv.h\nRemoving drivers/serial/bast_sio.c\nAuto-merging drivers/usb/input/hid-input.c.\nAuto-merging drivers/video/fbmem.c.\nAuto-merging include/asm-i386/bitops.h.\nmerge: warning: conflicts during merge\nERROR: Merge conflict in include/asm-i386/bitops.h.\nAuto-merging include/asm-x86_64/smp.h.\nAuto-merging kernel/sys.c.\nmerge: warning: conflicts during merge\nERROR: Merge conflict in kernel/sys.c.\nRemoving net/ipv4/utils.c\nRemoving sound/pcmcia/vx/vx_entry.c\nRemoving sound/pcmcia/vx/vxp440.c\nfatal: merge program failed\nAutomatic merge failed, fix up by hand\n\n-- \nPeter Osterlund - petero2@telia.com\nhttp://web.telia.com/~u89404340\n"},{"id":"6636","messageId":"Pine.LNX.4.58.0507300913000.29650@g5.osdl.org","threadId":"1365","inReplyTo":"m31x5gob8k.fsf@telia.com","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-30T16:18:17Z","receivedAt":"2005-07-30T16:18:17Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 30 Jul 2005, Peter Osterlund wrote:\n> \n> I have problems pulling linux kernel changes from\n> 33ac02aa4cef417871e128ab4a6565e751e5f3b2 to\n> b0825488a642cadcf39709961dde61440cb0731c into my local tree. At first\n> I thought your patch would fix it, but it doesn't:\n\nNo, this is a merge conflict failure, and you simply have conflicts in the\ntree. git did everything right, it just couldn't do an automatic merge.\n\n> ERROR: Merge conflict in arch/um/os-Linux/elf_aux.c.\n> ERROR: Merge conflict in arch/x86_64/kernel/smpboot.c.\n> ERROR: Merge conflict in drivers/i2c/busses/i2c-mpc.c.\n> ERROR: Merge conflict in include/asm-i386/bitops.h.\n> ERROR: Merge conflict in kernel/sys.c.\n\nWe don't have any nice graphical tools to show these to you like BitKeeper \nhad, although it shouldn't be fundamentally hard.\n\nWhat you need to do is basically edit all those five files, and look for \nthe conflicts (they are just like normal CVS conflicts:\n\n\t<<<<<<<\n\t\torig-branch\n\t\tconflict-contents\n\t=======\n\t\tpulled-branch\n\t\tconflict-contents\n\t>>>>>>>>\n\nand then you edit them to your liking until you have no more conflicts, \nand then you have to commit your manual resolve with\n\n\tgit commit --all\n\nwhich will commit the merge _and_ your manual conflict resolution.\n\nThis is something where a nice wrapper layer could do a lot better. I know \nthere are graphical three-way merge programs available.\n\nBut core git is no worse (and in fact a _lot_ better) than CVS in this \nregard, so I feel that the git merge, while obviously not perfect or even \nvery smart, is \"sufficient\" for what git is (ie it's up to porcelain to do \nanything better).\n\n\t\t\tLinus\n"},{"id":"6640","messageId":"m3fytwm313.fsf@telia.com","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507300913000.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Peter Osterlund","fromEmail":"petero2@telia.com","sentAt":"2005-07-30T20:50:48Z","receivedAt":"2005-07-30T20:50:48Z","isPatch":false,"sender":{"key":"petero2@telia.com","avatar":null},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> On Sat, 30 Jul 2005, Peter Osterlund wrote:\n> > \n> > I have problems pulling linux kernel changes from\n> > 33ac02aa4cef417871e128ab4a6565e751e5f3b2 to\n> > b0825488a642cadcf39709961dde61440cb0731c into my local tree. At first\n> > I thought your patch would fix it, but it doesn't:\n> \n> No, this is a merge conflict failure, and you simply have conflicts in the\n> tree. git did everything right, it just couldn't do an automatic merge.\n\nOK, but note that I didn't do any editing of any local files myself.\nBoth commit ids are from your public linux kernel git tree. What I did\nwas equivalent to:\n\n1. rsync from rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/\n2. waited a day or so.\n3. git-pull-script from the same kernel.org repository.\n\nIs it expected that you end up with merge conflicts in this case? If\nthat's the case, is there a better way to pull changes that doesn't\ninvolve having to resolve conflicts in files you didn't even know\nexisted?\n\nI think it should be possible to just fast forward to the new HEAD in\nthis situation.\n\n-- \nPeter Osterlund - petero2@telia.com\nhttp://web.telia.com/~u89404340\n"},{"id":"6641","messageId":"Pine.LNX.4.58.0507301354000.29650@g5.osdl.org","threadId":"1365","inReplyTo":"m3fytwm313.fsf@telia.com","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-30T20:56:16Z","receivedAt":"2005-07-30T20:56:16Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 30 Jul 2005, Peter Osterlund wrote:\n> \n> OK, but note that I didn't do any editing of any local files myself.\n> Both commit ids are from your public linux kernel git tree. What I did\n> was equivalent to:\n> \n> 1. rsync from rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/\n> 2. waited a day or so.\n> 3. git-pull-script from the same kernel.org repository.\n> \n> Is it expected that you end up with merge conflicts in this case?\n\nNope. Something went wrong.\n\n> I think it should be possible to just fast forward to the new HEAD in\n> this situation.\n\nIndeed.\n\nCan you send me your HEAD and MERGE_HEAD (don't do the merge).\n\nSounds like maybe \"git-merge-base\" is confused, and thinks HEAD is not\nreachable from FETCH_HEAD. It could have a similar bug git-rev-list had.\n\n\t\t\tLinus\n"},{"id":"6642","messageId":"Pine.LNX.4.58.0507302259140.26128@telia.com","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507301354000.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Peter Osterlund","fromEmail":"petero2@telia.com","sentAt":"2005-07-30T21:01:50Z","receivedAt":"2005-07-30T21:01:50Z","isPatch":false,"sender":{"key":"petero2@telia.com","avatar":null},"body":"On Sat, 30 Jul 2005, Linus Torvalds wrote:\n\n> On Sat, 30 Jul 2005, Peter Osterlund wrote:\n> >\n> > OK, but note that I didn't do any editing of any local files myself.\n> > Both commit ids are from your public linux kernel git tree. What I did\n> > was equivalent to:\n> >\n> > 1. rsync from rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/\n> > 2. waited a day or so.\n> > 3. git-pull-script from the same kernel.org repository.\n> >\n> > Is it expected that you end up with merge conflicts in this case?\n>\n> Nope. Something went wrong.\n>\n> > I think it should be possible to just fast forward to the new HEAD in\n> > this situation.\n>\n> Indeed.\n>\n> Can you send me your HEAD and MERGE_HEAD (don't do the merge).\n\nHEAD      : 33ac02aa4cef417871e128ab4a6565e751e5f3b2\nMERGE_HEAD: b0825488a642cadcf39709961dde61440cb0731c\n\n-- \nPeter Osterlund - petero2@telia.com\nhttp://web.telia.com/~u89404340\n"},{"id":"6644","messageId":"Pine.LNX.4.58.0507301428300.29650@g5.osdl.org","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507302259140.26128@telia.com","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-30T21:32:47Z","receivedAt":"2005-07-30T21:32:47Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 30 Jul 2005, Peter Osterlund wrote:\n> >\n> > Can you send me your HEAD and MERGE_HEAD (don't do the merge).\n> \n> HEAD      : 33ac02aa4cef417871e128ab4a6565e751e5f3b2\n> MERGE_HEAD: b0825488a642cadcf39709961dde61440cb0731c\n\nBingo.\n\nYup, it's git-merge-base, and it is confused by the same thing that \nconfused git-rev-list.\n\nThanks, I'll fix it.\n\n\t\tLinus\n"},{"id":"6646","messageId":"Pine.LNX.4.58.0507301507390.29650@g5.osdl.org","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507301428300.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-30T22:10:20Z","receivedAt":"2005-07-30T22:10:20Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 30 Jul 2005, Linus Torvalds wrote:\n> \n> Yup, it's git-merge-base, and it is confused by the same thing that \n> confused git-rev-list.\n> \n> Thanks, I'll fix it.\n\nHmm.. Here's a tentative fix. I'm not really happy with it, and maybe\nsomebody else can come up with a better one. I think this one ends up\nbeing quite a bit more expensive than the old one (it will look up _all_\ncommon parents that have a child that isn't common, and then select the\nnewest one of the bunch), but I haven't really thought it through very\nmuch.\n\nI bet there is a smarter way to do this, but this _should_ fix the problem\nPeter sees. Peter?\n\n\t\tLinus\n---\ndiff --git a/merge-base.c b/merge-base.c\n--- a/merge-base.c\n+++ b/merge-base.c\n@@ -2,54 +2,50 @@\n #include \"cache.h\"\n #include \"commit.h\"\n \n-static struct commit *process_list(struct commit_list **list_p, int this_mark,\n-\t\t\t\t   int other_mark)\n-{\n-\tstruct commit *item = (*list_p)->item;\n-\n-\tif (item->object.flags & other_mark) {\n-\t\treturn item;\n-\t} else {\n-\t\tpop_most_recent_commit(list_p, this_mark);\n-\t}\n-\treturn NULL;\n-}\n-\n static struct commit *common_ancestor(struct commit *rev1, struct commit *rev2)\n {\n-\tstruct commit_list *rev1list = NULL;\n-\tstruct commit_list *rev2list = NULL;\n+\tstruct commit_list *list = NULL;\n+\tstruct commit_list *result = NULL;\n \n-\tcommit_list_insert(rev1, &rev1list);\n-\trev1->object.flags |= 0x1;\n-\tcommit_list_insert(rev2, &rev2list);\n-\trev2->object.flags |= 0x2;\n+\tif (rev1 == rev2)\n+\t\treturn rev1;\n \n \tparse_commit(rev1);\n \tparse_commit(rev2);\n \n-\twhile (rev1list || rev2list) {\n-\t\tstruct commit *ret;\n-\t\tif (!rev1list) {\n-\t\t\t// process 2\n-\t\t\tret = process_list(&rev2list, 0x2, 0x1);\n-\t\t} else if (!rev2list) {\n-\t\t\t// process 1\n-\t\t\tret = process_list(&rev1list, 0x1, 0x2);\n-\t\t} else if (rev1list->item->date < rev2list->item->date) {\n-\t\t\t// process 2\n-\t\t\tret = process_list(&rev2list, 0x2, 0x1);\n-\t\t} else {\n-\t\t\t// process 1\n-\t\t\tret = process_list(&rev1list, 0x1, 0x2);\n+\trev1->object.flags |= 1;\n+\trev2->object.flags |= 2;\n+\tinsert_by_date(rev1, &list);\n+\tinsert_by_date(rev2, &list);\n+\n+\twhile (list) {\n+\t\tstruct commit *commit = list->item;\n+\t\tstruct commit_list *tmp = list, *parents;\n+\t\tint flags = commit->object.flags & 3;\n+\n+\t\tlist = list->next;\n+\t\tfree(tmp);\n+\t\tswitch (flags) {\n+\t\tcase 3:\n+\t\t\tinsert_by_date(commit, &result);\n+\t\t\tcontinue;\n+\t\tcase 0:\n+\t\t\tdie(\"git-merge-base: commit without either parent?\");\n \t\t}\n-\t\tif (ret) {\n-\t\t\tfree_commit_list(rev1list);\n-\t\t\tfree_commit_list(rev2list);\n-\t\t\treturn ret;\n+\t\tparents = commit->parents;\n+\t\twhile (parents) {\n+\t\t\tstruct commit *p = parents->item;\n+\t\t\tparents = parents->next;\n+\t\t\tif ((p->object.flags & flags) == flags)\n+\t\t\t\tcontinue;\n+\t\t\tparse_commit(p);\n+\t\t\tp->object.flags |= flags;\n+\t\t\tinsert_by_date(p, &list);\n \t\t}\n \t}\n-\treturn NULL;\n+\tif (!result)\n+\t\treturn NULL;\n+\treturn result->item;\n }\n \n int main(int argc, char **argv)\n@@ -64,6 +60,8 @@ int main(int argc, char **argv)\n \t}\n \trev1 = lookup_commit_reference(rev1key);\n \trev2 = lookup_commit_reference(rev2key);\n+\tif (!rev1 || !rev2)\n+\t\treturn 1;\n \tret = common_ancestor(rev1, rev2);\n \tif (!ret)\n \t\treturn 1;\n"},{"id":"6648","messageId":"m3ack3nb3c.fsf@telia.com","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507301507390.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Peter Osterlund","fromEmail":"petero2@telia.com","sentAt":"2005-07-30T23:11:19Z","receivedAt":"2005-07-30T23:11:19Z","isPatch":false,"sender":{"key":"petero2@telia.com","avatar":null},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> On Sat, 30 Jul 2005, Linus Torvalds wrote:\n> > \n> > Yup, it's git-merge-base, and it is confused by the same thing that \n> > confused git-rev-list.\n> > \n> > Thanks, I'll fix it.\n> \n> Hmm.. Here's a tentative fix. I'm not really happy with it, and maybe\n> somebody else can come up with a better one. I think this one ends up\n> being quite a bit more expensive than the old one (it will look up _all_\n> common parents that have a child that isn't common, and then select the\n> newest one of the bunch), but I haven't really thought it through very\n> much.\n> \n> I bet there is a smarter way to do this, but this _should_ fix the problem\n> Peter sees. Peter?\n\nYes, it does fix the problem. Thanks.\n\n-- \nPeter Osterlund - petero2@telia.com\nhttp://web.telia.com/~u89404340\n"},{"id":"6653","messageId":"Pine.LNX.4.58.0507302142380.29650@g5.osdl.org","threadId":"1365","inReplyTo":"m3ack3nb3c.fsf@telia.com","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-07-31T04:44:14Z","receivedAt":"2005-07-31T04:44:14Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 31 Jul 2005, Peter Osterlund wrote:\n>\n> > I bet there is a smarter way to do this, but this _should_ fix the problem\n> > Peter sees. Peter?\n> \n> Yes, it does fix the problem. Thanks.\n\nOk, Junio, can you apply the git-merge-base patch? It's not perfect, but\nit's clearly better than what's there right now.\n\nAdd a \"Signed-off-by: Linus Torvalds <torvalds@osdl.org>\" and edit the \ndescription a bit, perhaps.\n\n\t\tLinus\n"},{"id":"6654","messageId":"7v7jf7y1zv.fsf@assigned-by-dhcp.cox.net","threadId":"1365","inReplyTo":"Pine.LNX.4.58.0507302142380.29650@g5.osdl.org","subject":"Re: Fix interesting git-rev-list corner case","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-07-31T05:32:20Z","receivedAt":"2005-07-31T05:32:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> On Sat, 31 Jul 2005, Peter Osterlund wrote:\n>>\n>> > I bet there is a smarter way to do this, but this _should_ fix the problem\n>> > Peter sees. Peter?\n>> \n>> Yes, it does fix the problem. Thanks.\n>\n> Ok, Junio, can you apply the git-merge-base patch? It's not perfect, but\n> it's clearly better than what's there right now.\n>\n> Add a \"Signed-off-by: Linus Torvalds <torvalds@osdl.org>\" and edit the \n> description a bit, perhaps.\n\nOK.  It's already sitting at the top of the \"pu\" branch, so I'll\njust advance \"master\" with your sign off added.\n"}]}