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
Alex Riesen <raa.lkml@gmail.com>
Date
Jun 30, 2007, 13:33 UTC
Message-ID
<20070630133310.GB2866@steel.home>
In-Reply-To
<20070629083108.GA14747@liacs.nl>
Sven Verdoolaege, Fri, Jun 29, 2007 10:31:08 +0200:
> +		head_sha1=`cat "$GIT_DIR/REMOTE_HEAD"`
> +		case "$head_sha1" in
> +		'ref: refs/'*)
> +			;;

And what do you do if the HEAD is a reflink on something not in refs/? Like "ref: tmp"? Yes, it is unlikely, but is not forbidden.

How about "[0-9a-f]*)" instead:
               case "$head_sha1" in
               [0-9a-f]*)
                       git-http-fetch $v -a "$head_sha1" "$1" ||
                       rm -f "$GIT_DIR/REMOTE_HEAD"
                       ;;
               esac
Previous: Sven VerdoolaegeNext: Sven Verdoolaege
Message 5 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.