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

Re: Complex gitweb URL

From
CDCLOSE Dave <dave.close@us.thalesgroup.com>
Date
Jul 20, 2016, 21:35 UTC
Message-ID
<42f9c384-489d-3fce-2b27-8884e683a3d5@us.thalesgroup.com>
In-Reply-To
<578FEB1E.5060302@gmail.com>
Thanks, Jakub, for the quick response.
On 07/20/16 02:20 PM, Jakub Narębski wrote:
Show 5 quoted lines
>> If I replace the hb=SHA argument with hb=HEAD, the URL still works. But
>> I have no idea what I can use to replace the h=SHA argument.
>
> You can remove it.  'hb' (hash_base) and 'f' (filename) identify target
> file in a repository unambiguously.
If I do, leaving everything else present, I get "404 cannot find file".
Show 7 quoted lines
>> A complication is that the target file is not in the master branch.
>> Somehow I need to be able to specify the branch. I've tried putting it
>> as the h= argument but that results in "Reading blob failed". If I leave
>> out the h= argument entirely, gitweb responds, "404 cannot find file".
>
> Did you forgot to set 'hb' parameter?  Is said file present in revision
> given by the 'hb' parameter?

The file is present in both master and develop branches. If I include hb=HEAD and leave out h=, gitweb doesn't find either of them. Using hb=HEAD and h=develop or h=master results in "Reading blob failed".

-- 
	Dave Close
Previous: Jakub NarębskiNext: Jakub Narębski
Message 3 of 7 in “Complex gitweb URL”
  1. CLOSE DaveJul 20, 2016
  2. Jakub NarębskiJul 20, 2016
  3. CLOSE DaveJul 20, 2016
  4. Jakub NarębskiJul 20, 2016
  5. CLOSE DaveJul 20, 2016
  6. Jakub NarębskiJul 23, 2016
  7. Junio C HamanoJul 25, 2016

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.