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

Re: Git --reference bug(?)

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 19, 2011, 06:33 UTC
Message-ID
<7v8vohebhx.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vipnlebwb.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>>> 0397236d43e48e821cce5bbe6a80a1a56bb7cc3a	refs/tags/v2.6.12-rc3
>>> a2755a80f40e5794ddc20e00f781af9d6320fafb	refs/tags/v2.6.12-rc3^{}
>>> [...]
>>>
>>> I've never seen this format before; is this the remote protocol for
>>> peeled refs or maybe the behavior of an old version of git?
>>
>> This should be very well documented and has been the output from fairly
>> early days of ls-remote.
>
> I take the first half back. The ls-remote documentation seems to have
> bit-rotten quite a bit.
>
> IIRC, we started doing this when we introduced auto-following of the tag
> objects. Even update-server-info knows about it so it way predates smart
> HTTP and is a fairly old and established behaviour.

In addition, you must be careful about what is added with add_extra_ref(); they are often not refs but are placeholders for Git to know that the history leading to it is complete, even though they do not exist as refs. The values of real refs that exist in your alternate object store are treated this way, because you know you do not have to fetch (if you are initiating fetch-pack) or receive (if the other side is initiating send-pack) histories leading to them from the other side.

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “Git --reference bug(?)”
  1. Andrea GelminiOct 18, 2011
  2. Michael HaggertyOct 19, 2011
  3. Junio C HamanoOct 19, 2011
  4. Junio C HamanoOct 19, 2011
  5. Junio C HamanoOct 19, 2011
  6. Junio C HamanoOct 19, 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.