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

Re: [BUG REPORT] "git ls-remote http://git.domain.com/repo.git HEAD" doesn't work

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 14, 2008, 18:09 UTC
Message-ID
<7vlk17horn.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vprqkh423.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
> Mike Hommey <mh@glandium.org> writes:
>
>> http://www.kernel.org/pub/scm/git/git.git/info/refs doesn't contain HEAD.
>> Shouldn't it ?
>
> Traditionally it _never_ talked about HEAD...
Well, to clarify:
 (1) I do not think it is unreasonable to change update-server-info to
     include HEAD in its output.  That would make ls-remote output over
     all protocols consistent;
 (2) However, the client-side tools that run ls-remote may have to
     interact with repositories that are managed with older git (including
     "Today's git").  If they rely on the presense of HEAD, they _are_
     buggy today (and have been so forever), and they _will stay_ buggy
     when they need to access such repositories.

So I do not mind (1) for its "consistency" value, but that would not be a "fix" for your problem.

Also we can do (1) only after somebody audits our own callers to make sure that they do not to get upset by presense of HEAD. They might have been assuming they'd get nothing outside refs/ when talking via http, and suddenly starting to emit HEAD might break them, in which case we cannot afford to do (1) --- that would break older clients.

Previous: SvenNext: Sven
Message 11 of 13 in “[BUG REPORT] "git ls-remote http://git.domain.com/repo.git HEAD" doesn't work”
  1. SvenJun 14, 2008
  2. Mike HommeyJun 14, 2008
  3. Junio C HamanoJun 14, 2008
  4. SvenJun 14, 2008
  5. Mike HommeyJun 14, 2008
  6. Jeff KingJun 14, 2008
  7. Mike HommeyJun 14, 2008
  8. SvenJun 14, 2008
  9. Jeff KingJun 14, 2008
  10. SvenJun 14, 2008
  11. Junio C HamanoJun 14, 2008
  12. SvenJun 14, 2008
  13. Jeff KingJun 14, 2008

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.