git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregor Jasny <gjasny@googlemail.com>
To: git@vger.kernel.org, jupp0r@gmail.com
Subject: Git subtree stumbles over annotated tags
Date: Thu, 10 Mar 2016 16:51:37 +0100	[thread overview]
Message-ID: <56E19809.5040305@googlemail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]

Hello,

today I discovered that it's a bad idea to "git subtree pull" from an
annotated tag. This issue got discussed in those two threads:

http://comments.gmane.org/gmane.comp.version-control.git/247503
http://comments.gmane.org/gmane.comp.version-control.git/248395

I was under the impression that it is fixed in recent versions of git
but my homebrew 2.7.0 still behaves badly. If I run the attached script
to reproduce the issue I get the following error message:

> git push using:  sub somebranch
> fatal: 6d621d73ca18dc90424de0929357b5ae62988e00 is not a valid 'commit' object
> Can't copy commit ab38e3fe1ff27f7f87505db37d35adc5c3ceed27

> git ls-remote sub
> 99be40f8e3a4c926d45507be53ab6918789b3a52	HEAD
> 99be40f8e3a4c926d45507be53ab6918789b3a52	refs/heads/master
> 6d621d73ca18dc90424de0929357b5ae62988e00	refs/tags/sometag
> 99be40f8e3a4c926d45507be53ab6918789b3a52	refs/tags/sometag^{}

Besides handling this bug could you please give me a hint how to repair
my main repository? The problematic subtree pull happened some time ago
so I cannot alter the pull itself. I could go the brutal approach and
remove, then re-add the subtree but I guess there is a smarter approach.
Any help is appreciated!

Thanks,
Gregor

[-- Attachment #2: reproduce.sh --]
[-- Type: application/x-sh, Size: 415 bytes --]

             reply	other threads:[~2016-03-10 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 15:51 Gregor Jasny [this message]
2016-03-17 12:41 ` Git subtree stumbles over annotated tags Gregor Jasny
2016-05-21 23:02   ` David A. Greene

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=56E19809.5040305@googlemail.com \
    --to=gjasny@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=jupp0r@gmail.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 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).