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

How to clone-pack the HEAD?

From
Petr Baudis <pasky@ucw.cz>
Date
Dec 15, 2005, 00:44 UTC
Message-ID
<20051215004440.GM22159@pasky.or.cz>
  Hello,
  I'd like to make cg-clone use git-clone-pack instead of git-fetch-pack
so that it gets actually usable on large repositories, but I'm hitting
problems:
  (i) git-clone-pack url HEAD doesn't work
	If .git/HEAD already exists, it will panick because of the
	write_one_ref()'s O_CREAT|O_EXCL. If .git/HEAD doesn't exist,
	git-clone-pack refuses to do anything since it doesn't run
	with valid GIT repository.
  (ii) git-clone-pack has hardcoded assumptions about refs/heads/master
	The problem is, git-clone-pack doesn't seem to care about what
	ref does HEAD point to at the remote side, it just starts to
	panic and do weird things if it isn't master, which seems
	"really really wrong". Also, because git-clone-pack ... HEAD
	doesn't work, I think I have no way to clone the actual HEAD
	ref of the remote repository.
  Overally, I think what I really need is git-fetch-pack (with it
outputting the ref info which I can write on my own, DTRT'ing from
the Cogito POV), just with the option not to unpack the pack.
  I'd be very happy if fixing this would be possible before 1.0 so that
I can fix Cogito's fetching over git and ssh ASAP - git-clone-pack's
architecture seems to be way too much hardcoded to carry over head names
to the cloned repository (which is fine for the GIT porcelainish, but
not for Cogito philosophy).
  PS: Sorry if this mail is a bit incoherent - I'm already falling
asleep over the keyboard, but I don't want to see GIT 1.0 fly by during
the night. ;-) BTW, Junio, do you have any timeline (more precise than
"in the coming week(s)") for the release, or are you just waiting for
"n days without big problem" or something like that?
  Thanks,
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Next: Junio C Hamano
Message 1 of 10 in “How to clone-pack the HEAD?”
  1. Petr BaudisDec 15, 2005
  2. Junio C HamanoDec 15, 2005
  3. Petr BaudisDec 15, 2005
  4. Junio C HamanoDec 15, 2005
  5. Junio C HamanoDec 15, 2005
  6. Junio C HamanoDec 15, 2005
  7. Junio C HamanoDec 15, 2005
  8. Petr BaudisDec 18, 2005
  9. Petr BaudisDec 18, 2005
  10. Petr BaudisDec 15, 2005

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.