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

Re: [PATCH/RFC] gitweb: Default to $hash_base or HEAD for $hash in "commit" and "commitdiff" views

From
Junio C Hamano <junkio@cox.net>
Date
Nov 9, 2006, 00:09 UTC
Message-ID
<7vejsdqy4l.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200611082335.28296.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 13 quoted lines
>> Probably the latter; the user might be hand-crafting a URL
>> (maybe learned a commit object name from mailing list and
>> cutting and pasting) and mispasted the long hexadecimal string.
>> Silently giving HEAD may leave the user confused than "oops, we
>> do not see that commit object".
>  
> No, if there is 'h' (hash) parameter provided, then gitweb tries
> to use this. HEAD is used _only_ if nether hash, nor hash_base
> are provided, i.e. for URL like below
>
>   URL?p=project.git;a=commit
>
> i.e. without neither 'h' nor 'hb'.

Ah, that one I agree it makes sense to use HEAD. Also I am all for giving a more readable error message.

Previous: Jakub Narebski
Message 4 of 4 in “gitweb: Default to $hash_base or HEAD for $hash in "commit" and "commitdiff" views”
  1. gitweb: Default to $hash_base or HEAD for $hash in "commit" and "commitdiff" viewsJakub Narebski, Nov 8, 2006
  2. Junio C HamanoNov 8, 2006
  3. Jakub NarebskiNov 8, 2006
  4. Junio C HamanoNov 9, 2006

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.