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

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

From
Brandon Casey <drafnel@gmail.com>
Date
Oct 25, 2012, 00:18 UTC
Message-ID
<CA+sFfMdaaTwc82-J6a=wdjDzAFq6z8PS2rjSZ=tuyweOzuf4Kg@mail.gmail.com>
In-Reply-To
<CAM1C4GneOnyBQyJRbhtuYNDsc4NxXgFcfHrQpziLpp_AY0TjbA@mail.gmail.com>
On Wed, Oct 24, 2012 at 4:39 PM, Anand Kumria <akumria@acm.org> wrote:
Show 6 quoted lines
> 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?
Yes, with a slight tweak...
> kalki:[/tmp/gittest]% git tag -m "tag-test" tag-test
> kalki:[/tmp/gittest]% git cat-file -p e619

'-p' means pretty-print, i.e. produce a human-readable format. mktag supports the raw format. So you should invoke it like this:

      $ git cat-file tag e619
which should produce something like:
   object c0ae36fee730f7034b1f76c1490fe6f46f7ecad5
   type commit
   tag tag-test
   tagger Anand Kumria <akumria@acm.org> 1351121552 +0100
   tag-test
and is the format expected by mktag.
-Brandon
Previous: Anand KumriaNext: Anand Kumria
Message 2 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.