git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Bash <bash@genarts.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Tags, Grafts, and Clones, oh my!
Date: Fri, 20 Aug 2010 09:00:20 -0400 (EDT)	[thread overview]
Message-ID: <5752362.117414.1282309220152.JavaMail.root@mail.hq.genarts.com> (raw)
In-Reply-To: <20100820061459.GB12794@kytes>

> >
> >    error: refs/tags/tagFoo does not point to a valid object!
> >
> 
> It seems too vague to me. Can you submit your testcase? Perhaps we can
> work from there?

Sure:

mkdir gitTagBug
cd gitTagBug

git init foo
cd foo
echo A >> foo.txt
git add foo.txt
git commit -m "Created foo"
GRAFT_PARENT=`git rev-parse master`
echo B >> foo.txt
git commit -am "Added B"
cd ..

git init bar
cd bar
echo A >> foo.txt
echo C >> foo.txt
git add foo.txt
git commit -m "Added C"
GRAFT_CHILD=`git rev-parse master`
git tag -am "Tagging foo C" tagFoo $GRAFT_CHILD
cd ..

cd foo
git fetch ../bar refs/tags/tagFoo:refs/tags/tagFoo
echo "$GRAFT_CHILD $GRAFT_PARENT" >> .git/info/grafts
git filter-branch --tag-name-filter cat tagFoo
cd ..

# Purposely use a file URL to prune any unreferenced objects
git clone file:///`pwd`/foo newFoo

My output from the clone:

   Cloning into newFoo...
   remote: Counting objects: 9, done.
   remote: Compressing objects: 100% (3/3), done.
   remote: Total 9 (delta 0), reused 0 (delta 0)
   Receiving objects: 100% (9/9), done.
   error: refs/tags/tagFoo does not point to a valid object!

Thanks,
Stephen

  reply	other threads:[~2010-08-20 13:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <29380346.117285.1282264933599.JavaMail.root@mail.hq.genarts.com>
2010-08-20  0:54 ` Tags, Grafts, and Clones, oh my! Stephen Bash
2010-08-20  6:15   ` Ramkumar Ramachandra
2010-08-20 13:00     ` Stephen Bash [this message]
2010-08-20 13:39       ` Ramkumar Ramachandra
2010-08-20 14:40         ` Stephen Bash
2010-08-20 19:08           ` refs/original breaks git-clone for tags (was Re: Tags, Grafts, and Clones, oh my!) Stephen Bash
2010-09-07 23:14             ` refs/original breaks git-clone for tags 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=5752362.117414.1282309220152.JavaMail.root@mail.hq.genarts.com \
    --to=bash@genarts.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.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).