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

Re: [PATCH 1/2] Move code resolving packed refs into its own function.

From
Junio C Hamano <junkio@cox.net>
Date
Oct 3, 2006, 17:39 UTC
Message-ID
<7v4pulpad3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<eftjua$2ii$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
Show 10 quoted lines
> Junio C Hamano wrote:
>
>>  - I think gitweb should be Ok; it does peek-remote on the
>>    repository.  Although we would probably want to update
>>    git_get_references and git_get_refs_list sub to use
>>    for-each-ref there, that can be done as a later optimization.
>
> I'd rather have gitweb use git-for-each-ref after the command
> is in the official release... if not, then keep it in the 'next'
> branch.
Of course.  What else did you expect?
Show 5 quoted lines
> By the way, I have an idea to join the git-show-ref and git-for-each-ref:
> simply add --deref option to git-for-each-ref, which would output
> dereferenced tag just after the reference itself (well, perhaps with the
> exception when sorting, perhaps not), with the deref name like in
> git-show-ref and git-peek-remote, i.e. <ref>^{}

Patches welcome. --verify needs to use totally separate codepath though. for-each-ref is primarily for easy displaying and expects the caller to script in order to skip ones that are irrelevant while listing (e.g. asking for *objectname does not error for a non-tag but the caller can deduce that ref is not a tag by it being empty and skip it); show-ref --verify is for easy checking for an exact match and should not even walk.

Previous: Jakub Narebski
Message 14 of 14 in “Move code resolving packed refs into its own function.”
  1. 1/2 Move code resolving packed refs into its own function.Christian Couder, Sep 30, 2006
  2. Junio C HamanoSep 30, 2006
  3. 0/6 ref deletion and D/F conflict avoidance with packed-refs.Junio C Hamano, Sep 30, 2006
  4. 1/6 ref locking: allow 'foo' when 'foo/bar' used to exist but not anymore.Junio C Hamano, Sep 30, 2006
  5. 2/6 refs: minor restructuring of cached refs data.Junio C Hamano, Sep 30, 2006
  6. 3/6 lock_ref_sha1(): do not sometimes error() and sometimes die().Junio C Hamano, Sep 30, 2006
  7. 4/6 lock_ref_sha1(): check D/F conflict with packed ref when creating.Junio C Hamano, Sep 30, 2006
  8. 5/6 delete_ref(): delete packed refJunio C Hamano, Sep 30, 2006
  9. 6/6 git-branch: remove D/F check done by hand.Junio C Hamano, Sep 30, 2006
  10. Jeff KingSep 30, 2006
  11. Christian CouderOct 1, 2006
  12. Junio C HamanoOct 1, 2006
  13. Jakub NarebskiOct 3, 2006
  14. Junio C HamanoOct 3, 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.