git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Is git mktag supposed to accept git cat-file input?

From
AKAnand Kumria <akumria@acm.org>
Date
Oct 24, 2012, 23:39 UTC
Message-ID
<CAM1C4GneOnyBQyJRbhtuYNDsc4NxXgFcfHrQpziLpp_AY0TjbA@mail.gmail.com>
Hi,

I am doing some experimenting with git-mktag, and was looking into the format it expects on input.

Should this sequence of commands work?
kalki:[~]% mkdir /tmp/gittest; cd /tmp/gittest
kalki:[/tmp/gittest]% git init
Initialized empty Git repository in /tmp/gittest/.git/
kalki:[/tmp/gittest]% echo "test" > test
kalki:[/tmp/gittest]% git add test
kalki:[/tmp/gittest]% git commit -m "commit-test"
[master (root-commit) c0ae36f] commit-test
 1 file changed, 1 insertion(+)
 create mode 100644 test
kalki:[/tmp/gittest]% git tag -m "tag-test" tag-test
kalki:[/tmp/gittest]% git cat-file -p e619
object c0ae36fee730f7034b1f76c1490fe6f46f7ecad5
type commit
tag tag-test
tagger Anand Kumria <akumria@acm.org> Thu Oct 25 00:32:32 2012 +0100

tag-test kalki:[/tmp/gittest]% git cat-file -p e619 | sed -e's/tag-test/tag-test2/' > tag-test2 kalki:[/tmp/gittest]% cat tag-test2 object c0ae36fee730f7034b1f76c1490fe6f46f7ecad5 type commit tag tag-test2 tagger Anand Kumria <akumria@acm.org> Thu Oct 25 00:32:32 2012 +0100

tag-test2 kalki:[/tmp/gittest]% git mktag < tag-test2 error: char112: missing tag timestamp fatal: invalid tag signature file kalki:[/tmp/gittest]% git --version git version 1.7.9.5

The error message related to the timezone / timestamp being incorrect but I can't see what the problem is.

Any advice appreciated.
Please CC me as I may miss your reply.

Thanks, Anand

-- “Don’t be sad because it’s over. Smile because it happened.” – Dr. Seuss

Next: Brandon Casey
Message 1 of 4 in “Is git mktag supposed to accept git cat-file input?”
  1. Anand KumriaOct 24, 2012
  2. Brandon CaseyOct 25, 2012
  3. Anand KumriaOct 25, 2012
  4. Michael J GruberOct 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.