git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Strange behavior of gitweb

From
ASAlan Stern <stern@rowland.harvard.edu>
Date
Nov 27, 2009, 17:29 UTC
Message-ID
<Pine.LNX.4.44L0.0911271221460.30903-100000@netrider.rowland.org>
In-Reply-To
<m24oogyh2o.fsf@igel.home>
On Fri, 27 Nov 2009, Andreas Schwab wrote:
Show 17 quoted lines
> Alan Stern <stern@rowland.harvard.edu> writes:
> 
> > I recently ran across this strange behavior in the gitweb server at 
> > git.kernel.org.  The following URL:
> >
> > http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=commit;h=2d93148ab6988cad872e65d694c95e8944e1b62
> >
> > brings up a page containing commit 2d93148[...].  But that commit isn't
> > part of the 2.6.27.y tree!  It belongs to Linus's main tree, and it was
> > added long after 2.6.27.y was forked off.  The actual commit applied to
> > 2.6.27.y was 070bb0f3b6df167554f0ecdeb17a5bcdb1cd7b83.
> >
> > So what's going on here?
> 
> Nothing mysterious.  Every tree on kernel.org borrows from Linus' main
> tree via .git/objects/info/alternates, thus includes its whole object
> database by reference.

Hmm. That's all fine, but it can produce very misleading results like the one above. I can imagine the same sort of thing happening in other situations not involving alternates (e.g., orphaned commits).

Is there any way the web software can check whether the commit it found is actually an ancestor of the tip node in the requested tree, and if not add a big warning near the top of the page?

Alan Stern
Previous: Andreas Schwab
Message 3 of 3 in “Strange behavior of gitweb”
  1. Alan SternNov 26, 2009
  2. Andreas SchwabNov 26, 2009
  3. Alan SternNov 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.