From: David Glesser <glesserd@ensimag.fr>
To: <git@vger.kernel.org>
Cc: <Matthieu.Moy@grenoble-inp.fr>
Subject: tag format and tests
Date: Mon, 30 May 2011 16:12:30 +0200 [thread overview]
Message-ID: <db6ec478a7cb9b963d90651f5315ffec@ensimag.fr> (raw)
Hello,
We are currently coding a minimal git client using libgit2. We use git
tests to test our git client. We have an error caused by the tag format
used by libgit2.
The test t1006-cat-file.sh report many errors, the first one is:
not ok - 23 Size of tag is correct
This error comes from libgit2 and how it writes the timestamp, see below:
$ cat tag && echo
object 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
type blob
tag hellotag
tagger SpongeBob <spongebob.square@crusty-crabs.com> 0000000000 +0000
cheeseburger
$ git mktag < tag
7eade44ddd1b9ee24a44e0b2dde2561efea7f7d6
$ echo 7eade44ddd1b9ee24a44e0b2dde2561efea7f7d6 | git cat-file --batch
7eade44ddd1b9ee24a44e0b2dde2561efea7f7d6 tag 154
object 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
type blob
tag hellotag
tagger SpongeBob <spongebob.square@crusty-crabs.com> 0000000000 +0000
cheeseburger
And now using libgit2 :
$ git2 mktag < tag
49bc784cd2071c97a14841b3eab1181dd1c8fbcd
$ echo 49bc784cd2071c97a14841b3eab1181dd1c8fbcd | git cat-file --batch
49bc784cd2071c97a14841b3eab1181dd1c8fbcd tag 145
object 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
type blob
tag hellotag
tagger SpongeBob <spongebob.square@crusty-crabs.com> 0 +0000
cheeseburger
Both formats are accepted by git.
It's reasonable to say that the test is wrong because it doesn't fit
exactly with the format ?
David G.
next reply other threads:[~2011-05-30 14:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 14:12 David Glesser [this message]
2011-05-30 16:02 ` tag format and tests Jeff King
2011-05-30 16:09 ` David Glesser
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=db6ec478a7cb9b963d90651f5315ffec@ensimag.fr \
--to=glesserd@ensimag.fr \
--cc=Matthieu.Moy@grenoble-inp.fr \
--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).