{"thread":{"id":"5171","subject":"Since when is a tag a commit?","startedAt":"2006-08-08T02:12:51Z","lastAt":"2006-08-08T09:34:56Z","messageCount":3,"participants":["Shawn Pearce","Daniel Barkalow","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"24966","messageId":"20060808021251.GA19548@spearce.org","threadId":"5171","inReplyTo":null,"subject":"Since when is a tag a commit?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-08-08T02:12:51Z","receivedAt":"2006-08-08T02:12:51Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Current `next`:\n\n  [spearce@pb15 git]$ git cat-file commit v1.4.1\n  tree 34c8f9c263c1c20592d3f56c3d86bea322577155\n  parent 6631c73685bea3c6300938f4900db0d0c6bee457\n  author Linus Torvalds <torvalds@osdl.org> 1151691633 -0700\n  committer Junio C Hamano <junkio@cox.net> 1151803695 -0700\n  ...\n\nUhhh, that's a tag.  I know it is:\n\n  [spearce@pb15 git]$ git cat-file tag v1.4.1\n  object 0556a11a0df6b4119e01aa77dfb795561e62eb34\n  type commit\n  tag v1.4.1\n  tagger Junio C Hamano <junkio@cox.net> 1151818415 -0700\n  ...\n\nAnd I know its not a tree:\n\n  [spearce@pb15 git]$ git cat-file tree v1.4.1\n  100644 .gitignore{?MX~Ä????y?v?X?u100644 COPYINGo?...\n\nSo it better not be a blob:\n\n  [spearce@pb15 git]$ git cat-file blob v1.4.1\n  fatal: git-cat-file v1.4.1: bad file\n\nWhat the heck is going on?  Since when did git cat-file happily\nconsider a tag to be a tag, a commit and a tree?  Its that\nintentional that we're peeling back the object to the requested type?\n\n-- \nShawn.\n"},{"id":"24968","messageId":"Pine.LNX.4.64.0608072325390.9789@iabervon.org","threadId":"5171","inReplyTo":"20060808021251.GA19548@spearce.org","subject":"Re: Since when is a tag a commit?","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2006-08-08T03:28:32Z","receivedAt":"2006-08-08T03:28:32Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Mon, 7 Aug 2006, Shawn Pearce wrote:\n\n> What the heck is going on?  Since when did git cat-file happily\n> consider a tag to be a tag, a commit and a tree?  Its that\n> intentional that we're peeling back the object to the requested type?\n\nI think it's done that for a long time now. All of the other commands that \ntake a tree or a commit will accept a tag, so why shouldn't \"git cat-file \ntree\"?\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"24970","messageId":"eb9lrm$3ef$1@sea.gmane.org","threadId":"5171","inReplyTo":"20060808021251.GA19548@spearce.org","subject":"Re: Since when is a tag a commit?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-08-08T09:34:56Z","receivedAt":"2006-08-08T09:34:56Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Shawn Pearce wrote:\n\n> Current `next`:\n> \n>   [spearce@pb15 git]$ git cat-file commit v1.4.1\n>   tree 34c8f9c263c1c20592d3f56c3d86bea322577155\n>   parent 6631c73685bea3c6300938f4900db0d0c6bee457\n>   author Linus Torvalds <torvalds@osdl.org> 1151691633 -0700\n>   committer Junio C Hamano <junkio@cox.net> 1151803695 -0700\n>   ...\n\nThis is commit referenced by tag, i.e. v1.4.1^{commit}\n\n> Uhhh, that's a tag.  I know it is:\n> \n>   [spearce@pb15 git]$ git cat-file tag v1.4.1\n>   object 0556a11a0df6b4119e01aa77dfb795561e62eb34\n>   type commit\n>   tag v1.4.1\n>   tagger Junio C Hamano <junkio@cox.net> 1151818415 -0700\n>   ...\n\nThis is tag itself.\n\n> And I know its not a tree:\n> \n>   [spearce@pb15 git]$ git cat-file tree v1.4.1\n>   100644 .gitignore{?MX~Ä????y?v?X?u100644 COPYINGo?...\n\nThis is tree referenced by commit, referenced by tag, i.e. v1.4.1^{tree}\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}