Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

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

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:49:21

Hi Stephen,

Stephen Bash writes:
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 for the testcase! Offhand, it definitely looks like a bug. I'm
investigating to figure out which part of the chain is at fault.

-- Ram
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help