git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git checkout does not warn about tags without corresponding commits
@ 2009-01-02 12:25 Henrik Austad
  2009-01-02 15:04 ` Miklos Vajna
  2009-01-02 21:44 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Henrik Austad @ 2009-01-02 12:25 UTC (permalink / raw)
  To: git

Hi!

I recently tried to do a checkout of (what I thought was the first) inux 
kernel in the linux git repo.


git checkout -b 2.6.11 v2.6.11

This tag exists in the linux-tree (direct clone from Linus' tree), along with 
v2.6.11-tree

However, when I inspect the log, I see that I am still stuck in master. So, I 
did a git tag -v v2.6.11 and got the following:

object c39ae07f393806ccf406ef966e9a15afc43cc36a
type tree
tag v2.6.11-tree

This is the 2.6.11 tree object.

NOTE! There's no commit for this, since it happened before I started with git.
Eventually we'll import some sort of history, and that should tie this tree
object up to a real commit. In the meantime, this acts as an anchor point for
doing diffs etc under git.
gpg: Signature made Thu 05 May 2005 01:50:54 AM CEST using DSA key ID 76E21CBB
gpg: Good signature from "Linus Torvalds (tag signing key) 
<torvalds@osdl.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: FF6D 4EAC 37AC C1B9 53AE  C7E8 1776 2C46 76E2 1CBB


I can see that there's no commit for this, but, when there's a tag. I thought 
that a tag was just a commit-sha1 with a name attached, along with some tag 
info and a signature. Can you really create a tag without a commit?

Shouldn't git checkout fail in some way, letting me know that the checkout did 
not check out what I thought it did? (I got aware of the bug when I found 
CFS-related code in something I thought was 2.6.11.. :-)


-- 
 -> henrik

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

end of thread, other threads:[~2009-01-03 19:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-02 12:25 git checkout does not warn about tags without corresponding commits Henrik Austad
2009-01-02 15:04 ` Miklos Vajna
2009-01-02 21:44 ` Junio C Hamano
2009-01-03 11:00   ` Henrik Austad
2009-01-03 11:36     ` Junio C Hamano
2009-01-03 11:53       ` Junio C Hamano
2009-01-03 12:37       ` Henrik Austad
2009-01-03 19:31       ` Daniel Barkalow

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