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

Re: gitweb: 404 links on some blob pages

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 28, 2011, 17:24 UTC
Message-ID
<201111281824.53338.jnareb@gmail.com>
In-Reply-To
<CAKD0Uuyom0chUGfsh+oBRw8NoH4XutbmkVVKoQon6YO2V5oWkA@mail.gmail.com>
Jürgen Kreileder wrote:
Show 16 quoted lines
> 2011/11/27 Jakub Narebski <jnareb@gmail.com>:
> > Jürgen Kreileder <jk@blackdown.de> writes:
> >
> > > some blob pages have broken links:
> > >
> > > For example, on
> > > https://git.blackdown.de/?p=contactalbum.git;a=blob;f=Classes/WindowController.m;h=b84d1882cb6c3a2d2058cbdd56b2280b48f1690a;hb=b84d1882cb6c3a2d2058cbdd56b2280b48f1690a
> > > the blob_plain link for WindowController.m leads to '404 - Cannot find file':
> > > https://git.blackdown.de/?p=contactalbum.git;a=blob_plain;f=Classes/WindowController.m;hb=b84d1882cb6c3a2d2058cbdd56b2280b48f1690a
> >
> > That is strange.  The check is the same for 'blob' and 'blob_plain'
> > action...
> 
> The problem is the missing hash (h) parameter for the latter URL.
> Adding it to the blob_plain link makes it work.  Just as removing it
> from the blob link breaks that one as well.

Strange. From the look of the page it looks like the 'hb' ("hash_base") parameter that should lead to the commit from which we get the file is bogus.

But the "raw" link uses 
  href(action=>"blob_plain", -replay=>1)

which means that if 'blob' has "h" set correctly, then 'blob_plain' should too.

> Adding h=... to the tree link doesn't fix that case, though.

Of course it doesn't if you just copy _blob_ hash as _tree_ hash... :-P (i.e. if you just copy "h" parameter from 'blob' URL).

-- 
Jakub Narebski
Poland
Previous: Jakub Narebski
Message 3 of 3 in “gitweb: 404 links on some blob pages”
  1. Jürgen KreilederNov 27, 2011
  2. Jakub NarebskiNov 27, 2011
  3. Jakub NarebskiNov 28, 2011

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.