Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15

Re: git-fetch will leave a ref pointing to a tag

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:19

Hi,

On Mon, 2 Jul 2007, linux@horizon.com wrote:
$ git branch temp tags/v2.6.22-rc6
$ git fetch . tags/v2.6.22-rc7:temp
Why not do 'git branch temp v2.6.22-rc7' to begin with? Or even better: 
git checkout -b temp v2.6.22-rc7.

But in any case, you should know that there is no floating tag in git, and 
therefore, by storing it in the "branch" temp, you doom that branch to 
not be able to be committed to.

What you should have done, of course, is

$ git checkout temp
$ git merge v2.6.22-rc7
$ git checkout temp
$ (make minor change)
$ git commit -a
fatal: 087ea061253277de2b27e82d8572a386835a1b7e is not a valid 'commit' object

git-fetch does odd things when handed a tag rather than a commit.
No. It is perfectly sane to fetch a tag, and to store it.
Also, should "git checkout" have complained?
Maybe. Dunno.

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