From: Jeff King <peff@peff.net>
To: Josh Triplett <josh@joshtriplett.org>
Cc: git@vger.kernel.org, Jamey Sharp <jamey@minilop.net>
Subject: Re: Cloning a remote tag without using git-fetch-pack directly?
Date: Wed, 20 Apr 2011 03:38:05 -0400 [thread overview]
Message-ID: <20110420073805.GA2285@sigill.intra.peff.net> (raw)
In-Reply-To: <20110420072720.GC1790@feather>
On Wed, Apr 20, 2011 at 12:27:20AM -0700, Josh Triplett wrote:
> Sadly, though, I still can't check out the result:
>
> /tmp/linux-2.6$ git checkout FETCH_HEAD
> fatal: Cannot switch branch to a non-commit.
> (128) /tmp/linux-2.6$ git checkout -b master FETCH_HEAD
> fatal: Cannot switch branch to a non-commit.
>
> I guess I'd hoped for something similar to "detached HEAD" mode.
No, it wouldn't make any sense to have a non-commit in HEAD, detached or
otherwise, since you couldn't build commits on top of it (what would the
new commit's parent pointer have in it?).
If you just want to check the files out into the working tree, you can
do:
git read-tree --reset -u FETCH_HEAD
But I'm not really clear on what you're trying to accomplish with all of
this. If you can describe your ultimate goal, I might be able to help
more.
-Peff
next prev parent reply other threads:[~2011-04-20 7:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 22:20 Cloning a remote tag without using git-fetch-pack directly? Josh Triplett
2011-04-20 6:26 ` Jeff King
2011-04-20 7:27 ` Josh Triplett
2011-04-20 7:38 ` Jeff King [this message]
2011-04-20 7:40 ` Jonathan Nieder
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=20110420073805.GA2285@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jamey@minilop.net \
--cc=josh@joshtriplett.org \
/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).