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

Re: [PATCH (take 2)] gitweb: Do not parse refs by hand, use git-peek-remote instead

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 15, 2006, 07:14 UTC
Message-ID
<eedjrj$tja$1@sea.gmane.org>
In-Reply-To
<7v4pv91wqk.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 13 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> This is in response to Linus work on packed refs. Additionally it
>> makes gitweb work with symrefs, too.
>>
>> Do not parse refs by hand, using File::Find and reading individual
>> heads to get hash of reference, but use git-peek-remote output
>> instead.
> 
> Looks nicer.  Will apply.
> 
> Now, once we start doing this, it may make sense to rethink how
> this function and git_get_references functions are used.
[...]
Show 5 quoted lines
> I very much suspect that you can use git_get_refs_list to return
> a hash and a sorted list at the same time from the same input
> and make git_summary to do with just a single call to it, and
> get rid of git_get_references with a little bit of restructuring
> of the caller.

It can be done. Well, we could also collapse git_get_references and git_get_refs_list into one subroutine, but it would be slightly slower than git_get_references.

But, if we change git_get_refs_list to do also work of git_get_references, we should also change git_get_references to not use info/refs file at all (it can, and usually for unknown reasons is stale) but always use git-peek-remote, for consistency.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “gitweb: Do not parse refs by hand, use git-peek-remote instead”
  1. gitweb: Do not parse refs by hand, use git-peek-remote insteadJakub Narebski, Sep 14, 2006
  2. Junio C HamanoSep 14, 2006
  3. gitweb: Do not parse refs by hand, use git-peek-remote insteadJakub Narebski, Sep 15, 2006
  4. Junio C HamanoSep 15, 2006
  5. Jakub NarebskiSep 15, 2006
  6. Junio C HamanoSep 15, 2006
  7. Jakub NarebskiSep 15, 2006
  8. Junio C HamanoSep 15, 2006
  9. Jakub NarebskiSep 15, 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.