git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Anand Kumria <akumria@acm.org>
Cc: Brandon Casey <drafnel@gmail.com>, git@vger.kernel.org
Subject: Re: Is git mktag supposed to accept git cat-file input?
Date: Thu, 25 Oct 2012 10:34:51 +0200	[thread overview]
Message-ID: <5088F9AB.8090203@drmicha.warpmail.net> (raw)
In-Reply-To: <CAM1C4Gn6tr_bxG1De+kZecpJ7kLg7_hOO7q-aa7HwFkr9od6_Q@mail.gmail.com>

Anand Kumria venit, vidit, dixit 25.10.2012 02:58:
> Ahh, unix time. Of course.

That's the only difference *at the time being*, but this is not
guaranteed. Really, as Brandon says: "cat-file -p" is pretty printing
for human readability (which could be improved), and "cat-file <type>"
is the raw format which is the content being hashed to the sha1.

> 
> Thanks Brandon.
> 
> On 25 October 2012 01:18, Brandon Casey <drafnel@gmail.com> wrote:
>> On Wed, Oct 24, 2012 at 4:39 PM, Anand Kumria <akumria@acm.org> wrote:
>>> 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
>>
> 
> 
> 

      reply	other threads:[~2012-10-25  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 23:39 Is git mktag supposed to accept git cat-file input? Anand Kumria
2012-10-25  0:18 ` Brandon Casey
2012-10-25  0:58   ` Anand Kumria
2012-10-25  8:34     ` Michael J Gruber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5088F9AB.8090203@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=akumria@acm.org \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).