From: Junio C Hamano <gitster@pobox.com>
To: "Kevin Cagle \(kcagle\) \[CONT - Type 2\]" <kcagle@micron.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git subtree issue in more recent versions
Date: Tue, 29 Apr 2014 11:22:01 -0700 [thread overview]
Message-ID: <xmqqa9b4kncm.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <55893188F2F68B4B9819D7F9452F981D09FCDF67@NTXBOIMBX01.micron.com> (Kevin Cagle's message of "Tue, 29 Apr 2014 00:50:01 +0000")
"Kevin Cagle (kcagle) [CONT - Type 2]" <kcagle@micron.com> writes:
> $ git subtree add -P oldGit https://github.com/git/git.git tags/v1.9.2
>
> Will produce this error:
>
> 10ff115f5c572299de4e04ade0d7adb3c75fbf1f is not a valid 'commit' object
>
> The bug isn't found in 1.7.1 (installed subtree manually) but is found in 1.9.0 and 2.0.0.rc1.
>
> It's related to the git fetch putting the "wrong" SHA1 in .git/FETCH_HEAD.
The change 7a2b128d is very much deliberate; we wanted not to lose
information that the user was trying to pull a tag not a commit,
because not unwrapping a tag to a commit it points at too early is
essential to allow pulling and merging a signed tag, which was
released as part of the 1.7.9 that happened in late January 2012
(whew, is it already more than two years ago? time flies).
commit 7a2b128d13d880635e7317a9208cfa42a660f143
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Wed Nov 2 19:19:34 2011 -0700
fetch: do not store peeled tag object names in FETCH_HEAD
We do not want to record tags as parents of a merge when the user does
"git pull $there tag v1.0" to merge tagged commit, but that is not a good
enough excuse to peel the tag down to commit when storing in FETCH_HEAD.
The caller of underlying "git fetch $there tag v1.0" may have other uses
of information contained in v1.0 tag in mind.
If the caller of "fetch" (like the codepath in subtree) must see a
commit object, it needs to unwrap the tag itself in the new (eh, not
so new, though ;-) world order.
prev parent reply other threads:[~2014-04-29 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 0:50 git subtree issue in more recent versions Kevin Cagle (kcagle) [CONT - Type 2]
2014-04-29 18:22 ` Junio C Hamano [this message]
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=xmqqa9b4kncm.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kcagle@micron.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.