git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tracking branch on a tag
@ 2009-04-23  9:52 Simon Braunschmidt
  2009-04-27 16:26 ` [PATCH] Fix behavior with non-committish upstream references Michael J Gruber
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Braunschmidt @ 2009-04-23  9:52 UTC (permalink / raw)
  To: git

Hi

So i set up a tracking branch on an annotated signed tag like:


$git branch --track foobranch v2.6.26
 >Branch foobranch set up to track local ref refs/tags/v2.6.26.

Check it out, get an error

$git checkout foobranch
 >Switched to branch 'foobranch'
 >error: Object 14650d6ec137e70b6c1918cdef235027c5156020 is a commit, 
not a tag
 >fatal: Invalid symmetric difference expression 
bce7f793daec3e65ec5c5705d2457b81fe7b5725...14650d6ec137e70b6c1918cdef235027c5156020

Inspect the relevant object

$git-cat-file -p bce7f793daec3e65ec5c5705d2457b81fe7b5725
 >tree 05bc81f9b27a1ab60ea4e506357f0c7f2ece4eda
 >parent ec229e830060091b9be63c8f873c1b2407a82821
 >author Linus Torvalds <torvalds@linux-foundation.org> 1215985889 -0700
 >committer Linus Torvalds <torvalds@linux-foundation.org> 1215985889 -0700

 >Linux 2.6.26

$git-cat-file -p 14650d6ec137e70b6c1918cdef235027c5156020
 >object bce7f793daec3e65ec5c5705d2457b81fe7b5725
 >type commit
 >tag v2.6.26
 >tagger Linus Torvalds <torvalds@linux-foundation.org> Sun Jul 13 
 >14:51:38 2008 -0700
 >
 >Linux 2.6.26
 >-----BEGIN PGP SIGNATURE-----
 >Version: GnuPG v1.4.9 (GNU/Linux)
 >
 >iEYEABECAAYFAkh6ePIACgkQF3YsRnbiHLuJcACgpHzd21qAY25V2VQWBCYPW8bB
 >Z8MAoJ9qfiwuRt27cdrmAU2aJq+YFrYs
 >=aHK8
 >-----END PGP SIGNATURE-----

I get this errors only on annotated/signed tags, not on lightweight 
tags. Admittedly it doesnt make much sense to track a tag, yet this 
error message makes even less sense:

error: Object 14650d6ec137e70b6c1918cdef235027c5156020 is a commit, not 
a tag

with 14650d being a tag.

Is this error message serious, as fatal sound quite harsh? Can it be 
avoided, by guiding the user on  branch creation or by simply not 
showing it in this situation?

Gruessle
Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-28  7:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23  9:52 tracking branch on a tag Simon Braunschmidt
2009-04-27 16:26 ` [PATCH] Fix behavior with non-committish upstream references Michael J Gruber
2009-04-28  7:30   ` Junio C Hamano
2009-04-28  7:44     ` Michael J Gruber

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).