{"thread":{"id":"31935","subject":"Is git mktag supposed to accept git cat-file input?","startedAt":"2012-10-24T23:39:13Z","lastAt":"2012-10-25T08:34:51Z","messageCount":4,"participants":["Anand Kumria","Brandon Casey","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"201829","messageId":"CAM1C4GneOnyBQyJRbhtuYNDsc4NxXgFcfHrQpziLpp_AY0TjbA@mail.gmail.com","threadId":"31935","inReplyTo":null,"subject":"Is git mktag supposed to accept git cat-file input?","fromName":"Anand Kumria","fromEmail":"akumria@acm.org","sentAt":"2012-10-24T23:39:13Z","receivedAt":"2012-10-24T23:39:13Z","isPatch":false,"sender":{"key":"akumria@acm.org","avatar":null},"body":"Hi,\n\nI am doing some experimenting with git-mktag, and was looking into the\nformat it expects on input.\n\nShould this sequence of commands work?\n\nkalki:[~]% mkdir /tmp/gittest; cd /tmp/gittest\nkalki:[/tmp/gittest]% git init\nInitialized empty Git repository in /tmp/gittest/.git/\nkalki:[/tmp/gittest]% echo \"test\" > test\nkalki:[/tmp/gittest]% git add test\nkalki:[/tmp/gittest]% git commit -m \"commit-test\"\n[master (root-commit) c0ae36f] commit-test\n 1 file changed, 1 insertion(+)\n create mode 100644 test\nkalki:[/tmp/gittest]% git tag -m \"tag-test\" tag-test\nkalki:[/tmp/gittest]% git cat-file -p e619\nobject c0ae36fee730f7034b1f76c1490fe6f46f7ecad5\ntype commit\ntag tag-test\ntagger Anand Kumria <akumria@acm.org> Thu Oct 25 00:32:32 2012 +0100\n\ntag-test\nkalki:[/tmp/gittest]% git cat-file -p e619 | sed\n-e's/tag-test/tag-test2/' > tag-test2\nkalki:[/tmp/gittest]% cat tag-test2\nobject c0ae36fee730f7034b1f76c1490fe6f46f7ecad5\ntype commit\ntag tag-test2\ntagger Anand Kumria <akumria@acm.org> Thu Oct 25 00:32:32 2012 +0100\n\ntag-test2\nkalki:[/tmp/gittest]% git mktag < tag-test2\nerror: char112: missing tag timestamp\nfatal: invalid tag signature file\nkalki:[/tmp/gittest]% git --version\ngit version 1.7.9.5\n\nThe error message related to the timezone / timestamp being incorrect\nbut I can't see what the problem is.\n\nAny advice appreciated.\n\nPlease CC me as I may miss your reply.\n\nThanks,\nAnand\n\n--\n“Don’t be sad because it’s over. Smile because it happened.” – Dr. Seuss\n"},{"id":"201830","messageId":"CA+sFfMdaaTwc82-J6a=wdjDzAFq6z8PS2rjSZ=tuyweOzuf4Kg@mail.gmail.com","threadId":"31935","inReplyTo":"CAM1C4GneOnyBQyJRbhtuYNDsc4NxXgFcfHrQpziLpp_AY0TjbA@mail.gmail.com","subject":"Re: Is git mktag supposed to accept git cat-file input?","fromName":"Brandon Casey","fromEmail":"drafnel@gmail.com","sentAt":"2012-10-25T00:18:11Z","receivedAt":"2012-10-25T00:18:11Z","isPatch":false,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On Wed, Oct 24, 2012 at 4:39 PM, Anand Kumria <akumria@acm.org> wrote:\n> Hi,\n>\n> I am doing some experimenting with git-mktag, and was looking into the\n> format it expects on input.\n>\n> Should this sequence of commands work?\n\nYes, with a slight tweak...\n\n> kalki:[/tmp/gittest]% git tag -m \"tag-test\" tag-test\n> kalki:[/tmp/gittest]% git cat-file -p e619\n\n'-p' means pretty-print, i.e. produce a human-readable format.  mktag\nsupports the raw format.  So you should invoke it like this:\n\n      $ git cat-file tag e619\n\nwhich should produce something like:\n\n   object c0ae36fee730f7034b1f76c1490fe6f46f7ecad5\n   type commit\n   tag tag-test\n   tagger Anand Kumria <akumria@acm.org> 1351121552 +0100\n\n   tag-test\n\nand is the format expected by mktag.\n\n-Brandon\n"},{"id":"201833","messageId":"CAM1C4Gn6tr_bxG1De+kZecpJ7kLg7_hOO7q-aa7HwFkr9od6_Q@mail.gmail.com","threadId":"31935","inReplyTo":"CA+sFfMdaaTwc82-J6a=wdjDzAFq6z8PS2rjSZ=tuyweOzuf4Kg@mail.gmail.com","subject":"Re: Is git mktag supposed to accept git cat-file input?","fromName":"Anand Kumria","fromEmail":"akumria@acm.org","sentAt":"2012-10-25T00:58:38Z","receivedAt":"2012-10-25T00:58:38Z","isPatch":false,"sender":{"key":"akumria@acm.org","avatar":null},"body":"Ahh, unix time. Of course.\n\nThanks Brandon.\n\nOn 25 October 2012 01:18, Brandon Casey <drafnel@gmail.com> wrote:\n> On Wed, Oct 24, 2012 at 4:39 PM, Anand Kumria <akumria@acm.org> wrote:\n>> Hi,\n>>\n>> I am doing some experimenting with git-mktag, and was looking into the\n>> format it expects on input.\n>>\n>> Should this sequence of commands work?\n>\n> Yes, with a slight tweak...\n>\n>> kalki:[/tmp/gittest]% git tag -m \"tag-test\" tag-test\n>> kalki:[/tmp/gittest]% git cat-file -p e619\n>\n> '-p' means pretty-print, i.e. produce a human-readable format.  mktag\n> supports the raw format.  So you should invoke it like this:\n>\n>       $ git cat-file tag e619\n>\n> which should produce something like:\n>\n>    object c0ae36fee730f7034b1f76c1490fe6f46f7ecad5\n>    type commit\n>    tag tag-test\n>    tagger Anand Kumria <akumria@acm.org> 1351121552 +0100\n>\n>    tag-test\n>\n> and is the format expected by mktag.\n>\n> -Brandon\n>\n\n\n\n-- \n“Don’t be sad because it’s over. Smile because it happened.” – Dr. Seuss\n"},{"id":"201866","messageId":"5088F9AB.8090203@drmicha.warpmail.net","threadId":"31935","inReplyTo":"CAM1C4Gn6tr_bxG1De+kZecpJ7kLg7_hOO7q-aa7HwFkr9od6_Q@mail.gmail.com","subject":"Re: Is git mktag supposed to accept git cat-file input?","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-10-25T08:34:51Z","receivedAt":"2012-10-25T08:34:51Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Anand Kumria venit, vidit, dixit 25.10.2012 02:58:\n> Ahh, unix time. Of course.\n\nThat's the only difference *at the time being*, but this is not\nguaranteed. Really, as Brandon says: \"cat-file -p\" is pretty printing\nfor human readability (which could be improved), and \"cat-file <type>\"\nis the raw format which is the content being hashed to the sha1.\n\n> \n> Thanks Brandon.\n> \n> On 25 October 2012 01:18, Brandon Casey <drafnel@gmail.com> wrote:\n>> On Wed, Oct 24, 2012 at 4:39 PM, Anand Kumria <akumria@acm.org> wrote:\n>>> Hi,\n>>>\n>>> I am doing some experimenting with git-mktag, and was looking into the\n>>> format it expects on input.\n>>>\n>>> Should this sequence of commands work?\n>>\n>> Yes, with a slight tweak...\n>>\n>>> kalki:[/tmp/gittest]% git tag -m \"tag-test\" tag-test\n>>> kalki:[/tmp/gittest]% git cat-file -p e619\n>>\n>> '-p' means pretty-print, i.e. produce a human-readable format.  mktag\n>> supports the raw format.  So you should invoke it like this:\n>>\n>>       $ git cat-file tag e619\n>>\n>> which should produce something like:\n>>\n>>    object c0ae36fee730f7034b1f76c1490fe6f46f7ecad5\n>>    type commit\n>>    tag tag-test\n>>    tagger Anand Kumria <akumria@acm.org> 1351121552 +0100\n>>\n>>    tag-test\n>>\n>> and is the format expected by mktag.\n>>\n>> -Brandon\n>>\n> \n> \n> \n"}]}