From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: Re: How to clone-pack the HEAD?
Date: Wed, 14 Dec 2005 17:20:28 -0800 [thread overview]
Message-ID: <7vfyovtaub.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20051215004440.GM22159@pasky.or.cz> (Petr Baudis's message of "Thu, 15 Dec 2005 01:44:40 +0100")
Petr Baudis <pasky@ucw.cz> writes:
> (i) git-clone-pack url HEAD doesn't work
"clone-pack url branchname" might work, but the thing is, nobody
uses clone-pack with explicit heads arguments so if HEAD does
not work I am not surprised at all.
> (ii) git-clone-pack has hardcoded assumptions about refs/heads/master
I've read that part of the code twice in the past, but my
recollection is it tries hard to "guess" where HEAD points at
(because the remote side does not tell us, other than which
commit object HEAD points at). When more than two branch heads
point at the same commit as HEAD records, it gives preference to
"master" branch while guessing, but otherwise there is nothing
special about the "master" branch.
The problem is, clone-pack is about cloning and not fetching. I
am not claiming it is the right design decision --- after all,
it was the oldest of the git native protocol driver suite ---
but just stating where it stands with all the history behind its
(and git-fetch-pack's) evolution.
I think extending git-fetch-pack to optionally keep things
packed would be somewhat painful but the right approach. Less
painful and readily doable would be to run clone-pack as is, and
reorganize the result of "copy of the remote" yourself. That
would be a straightforward thing to do if you are using it for
the initial cloning.
next prev parent reply other threads:[~2005-12-15 1:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 0:44 How to clone-pack the HEAD? Petr Baudis
2005-12-15 1:20 ` Junio C Hamano [this message]
2005-12-15 1:32 ` Petr Baudis
2005-12-15 1:45 ` Junio C Hamano
2005-12-15 1:53 ` Junio C Hamano
2005-12-15 5:29 ` Junio C Hamano
2005-12-15 6:21 ` Junio C Hamano
2005-12-18 0:53 ` Petr Baudis
2005-12-18 0:38 ` Petr Baudis
2005-12-15 1:59 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vfyovtaub.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).