tag format and tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx> 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.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]