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

Re: [PATCH] git-clone: fetch possibly detached HEAD over dumb http

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2007, 02:22 UTC
Message-ID
<7vy7i0amnn.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070630222336.GA2703@steel.home>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 5 quoted lines
> The check for .git validity includes checking if HEAD contains
> something sane, and this check is very simple: the HEAD is read
> (readlink(2) or plain read(2)) and tested if it contains a
> reference starting with "refs/", which maybe inconsistent with
> resolve_gitlink_ref, but probably ok.

Ah, I was not paying close attention to resolve_gitlink_ref(); if it does not require HEAD to point at refs/ I would say it is a bug.

Come to think of it, I would further say that we probably should tighten it up a bit: HEAD must be either a valid commit object name (i.e. detached) or a ref that point at somewhere under refs/heads hierarchy, not just anywhere in refs/.

Previous: Alex RiesenNext: Alex Riesen
Message 8 of 9 in “git-clone: fetch possibly detached HEAD over dumb http”
  1. git-clone: fetch possibly detached HEAD over dumb httpSven Verdoolaege, Jun 28, 2007
  2. Junio C HamanoJun 29, 2007
  3. Sven VerdoolaegeJun 29, 2007
  4. git-clone: fetch possibly detached HEAD over dumb httpSven Verdoolaege, Jun 29, 2007
  5. Alex RiesenJun 30, 2007
  6. Sven VerdoolaegeJun 30, 2007
  7. Alex RiesenJun 30, 2007
  8. Junio C HamanoJul 1, 2007
  9. Alex RiesenJul 1, 2007

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.