git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tags, Grafts, and Clones, oh my!

From
SBStephen Bash <bash@genarts.com>
Date
Aug 20, 2010, 13:00 UTC
Message-ID
<5752362.117414.1282309220152.JavaMail.root@mail.hq.genarts.com>
In-Reply-To
<20100820061459.GB12794@kytes>
Show 6 quoted lines
> >
> >    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

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 3 of 7 in “Tags, Grafts, and Clones, oh my!”
  1. Stephen BashAug 20, 2010
  2. Ramkumar RamachandraAug 20, 2010
  3. Stephen BashAug 20, 2010
  4. Ramkumar RamachandraAug 20, 2010
  5. Stephen BashAug 20, 2010
  6. refs/original breaks git-clone for tags (was Re: Tags, Grafts, and Clones, oh my!)Stephen Bash, Aug 20, 2010
  7. Jonathan NiederSep 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.