* Is git mktag supposed to accept git cat-file input?
@ 2012-10-24 23:39 Anand Kumria
2012-10-25 0:18 ` Brandon Casey
0 siblings, 1 reply; 4+ messages in thread
From: Anand Kumria @ 2012-10-24 23:39 UTC (permalink / raw
To: git
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is git mktag supposed to accept git cat-file input?
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
0 siblings, 1 reply; 4+ messages in thread
From: Brandon Casey @ 2012-10-25 0:18 UTC (permalink / raw
To: Anand Kumria; +Cc: git
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is git mktag supposed to accept git cat-file input?
2012-10-25 0:18 ` Brandon Casey
@ 2012-10-25 0:58 ` Anand Kumria
2012-10-25 8:34 ` Michael J Gruber
0 siblings, 1 reply; 4+ messages in thread
From: Anand Kumria @ 2012-10-25 0:58 UTC (permalink / raw
To: Brandon Casey; +Cc: git
Ahh, unix time. Of course.
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
>
--
“Don’t be sad because it’s over. Smile because it happened.” – Dr. Seuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is git mktag supposed to accept git cat-file input?
2012-10-25 0:58 ` Anand Kumria
@ 2012-10-25 8:34 ` Michael J Gruber
0 siblings, 0 replies; 4+ messages in thread
From: Michael J Gruber @ 2012-10-25 8:34 UTC (permalink / raw
To: Anand Kumria; +Cc: Brandon Casey, git
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
>>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-25 8:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).