Re: git clone (ssh://) skips detached HEAD
- From
Jeff King <peff@peff.net>
- Date
- Jun 3, 2011, 05:09 UTC
- Message-ID
- <20110603050901.GA883@sigill.intra.peff.net>
- In-Reply-To
- <20110601224754.GA16820@sigill.intra.peff.net>
On Wed, Jun 01, 2011 at 06:47:54PM -0400, Jeff King wrote:
Show 8 quoted lines
> I wrote some tests that document what I think _should_ happen. In > addition to this bug, there's one other (the second in my list below). > > I'm done for the day, but may take a look at actually fixing these > tomorrow. > > -- >8 -- > Subject: [PATCH] t: add tests for cloning remotes with detached HEAD
So this turned out to be a tiny amount of code, which is nice. And all of the "clone should fetch HEAD" bits stay inside builtin/clone.c, which gives me warm fuzzies that my change will not accidentally break regular fetches.
Unfortunately, there's a test failure in t5800; apparently our git-remote-testgit helper does not like us fetching HEAD. I haven't figured out if it's a bug in the helper, or if this will be a problem in general with remote helpers. More details in 3/3.
[1/3]: t: add tests for cloning remotes with detached HEAD [2/3]: consider only branches in guess_remote_head [3/3]: clone: always fetch remote HEAD
-Peff