{"thread":{"id":"21764","subject":"Strange behavior of gitweb","startedAt":"2009-11-26T17:32:48Z","lastAt":"2009-11-27T17:29:53Z","messageCount":3,"participants":["Alan Stern","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128483","messageId":"Pine.LNX.4.44L0.0911261225130.17259-100000@netrider.rowland.org","threadId":"21764","inReplyTo":null,"subject":"Strange behavior of gitweb","fromName":"Alan Stern","fromEmail":"stern@rowland.harvard.edu","sentAt":"2009-11-26T17:32:48Z","receivedAt":"2009-11-26T17:32:48Z","isPatch":false,"sender":{"key":"stern@rowland.harvard.edu","avatar":null},"body":"If this isn't the right place to post this, could somebody please let \nme know where would be better?\n\nI recently ran across this strange behavior in the gitweb server at \ngit.kernel.org.  The following URL:\n\nhttp://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=commit;h=2d93148ab6988cad872e65d694c95e8944e1b62\n\nbrings up a page containing commit 2d93148[...].  But that commit isn't\npart of the 2.6.27.y tree!  It belongs to Linus's main tree, and it was\nadded long after 2.6.27.y was forked off.  The actual commit applied to\n2.6.27.y was 070bb0f3b6df167554f0ecdeb17a5bcdb1cd7b83.\n\nSo what's going on here?  Shouldn't the correct behavior be to report\nan error, since the requested commit isn't in the history of the\nspecified tree?\n\nThanks,\n\nAlan Stern\n"},{"id":"128518","messageId":"m24oogyh2o.fsf@igel.home","threadId":"21764","inReplyTo":"Pine.LNX.4.44L0.0911261225130.17259-100000@netrider.rowland.org","subject":"Re: Strange behavior of gitweb","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2009-11-26T23:58:07Z","receivedAt":"2009-11-26T23:58:07Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Alan Stern <stern@rowland.harvard.edu> writes:\n\n> I recently ran across this strange behavior in the gitweb server at \n> git.kernel.org.  The following URL:\n>\n> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=commit;h=2d93148ab6988cad872e65d694c95e8944e1b62\n>\n> brings up a page containing commit 2d93148[...].  But that commit isn't\n> part of the 2.6.27.y tree!  It belongs to Linus's main tree, and it was\n> added long after 2.6.27.y was forked off.  The actual commit applied to\n> 2.6.27.y was 070bb0f3b6df167554f0ecdeb17a5bcdb1cd7b83.\n>\n> So what's going on here?\n\nNothing mysterious.  Every tree on kernel.org borrows from Linus' main\ntree via .git/objects/info/alternates, thus includes its whole object\ndatabase by reference.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"128578","messageId":"Pine.LNX.4.44L0.0911271221460.30903-100000@netrider.rowland.org","threadId":"21764","inReplyTo":"m24oogyh2o.fsf@igel.home","subject":"Re: Strange behavior of gitweb","fromName":"Alan Stern","fromEmail":"stern@rowland.harvard.edu","sentAt":"2009-11-27T17:29:53Z","receivedAt":"2009-11-27T17:29:53Z","isPatch":false,"sender":{"key":"stern@rowland.harvard.edu","avatar":null},"body":"On Fri, 27 Nov 2009, Andreas Schwab wrote:\n\n> Alan Stern <stern@rowland.harvard.edu> writes:\n> \n> > I recently ran across this strange behavior in the gitweb server at \n> > git.kernel.org.  The following URL:\n> >\n> > http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=commit;h=2d93148ab6988cad872e65d694c95e8944e1b62\n> >\n> > brings up a page containing commit 2d93148[...].  But that commit isn't\n> > part of the 2.6.27.y tree!  It belongs to Linus's main tree, and it was\n> > added long after 2.6.27.y was forked off.  The actual commit applied to\n> > 2.6.27.y was 070bb0f3b6df167554f0ecdeb17a5bcdb1cd7b83.\n> >\n> > So what's going on here?\n> \n> Nothing mysterious.  Every tree on kernel.org borrows from Linus' main\n> tree via .git/objects/info/alternates, thus includes its whole object\n> database by reference.\n\nHmm.  That's all fine, but it can produce very misleading results like\nthe one above.  I can imagine the same sort of thing happening in other\nsituations not involving alternates (e.g., orphaned commits).\n\nIs there any way the web software can check whether the commit it found\nis actually an ancestor of the tip node in the requested tree, and if\nnot add a big warning near the top of the page?\n\nAlan Stern\n"}]}