]> git.proxmox.com Git - libgit2.git/commit
tags: Fixed the tag parser to correctly treat the message field as optional.
authorErik van Zijst <erik.van.zijst@gmail.com>
Fri, 2 Nov 2012 17:28:17 +0000 (10:28 -0700)
committerErik van Zijst <erik.van.zijst@gmail.com>
Fri, 2 Nov 2012 17:28:17 +0000 (10:28 -0700)
commit6bb9fea13ee2da6475ac799acd5f8296bc1a8537
treed9947d87d5f11136993cc4cf08c3ea00897329dc
parente30c052c4e46df9d8f929ab4f86f34718bb15a5d
tags: Fixed the tag parser to correctly treat the message field as optional.

This fix makes libgit2 capable of parsing annotated tag objects that lack
the optional message/description field.
Previously, libgit2 treated this field as mandatory and raised a tag_error on
such tags. However, the message field is optional.

An example of such a tag is refs/tags/v2.6.16.31-rc1 in Linux:

$ git cat-file tag refs/tags/v2.6.16.31-rc1
object afaa018cefb6af63befef1df7d8febaae904434f
type commit
tag v2.6.16.31-rc1
tagger Adrian Bunk <bunk@stusta.de> 1162716505 +0100
$
src/tag.c
tests-clar/object/tag/read.c
tests-clar/resources/short_tag.git/HEAD [new file with mode: 0644]
tests-clar/resources/short_tag.git/config [new file with mode: 0644]
tests-clar/resources/short_tag.git/index [new file with mode: 0644]
tests-clar/resources/short_tag.git/objects/4a/5ed60bafcf4638b7c8356bd4ce1916bfede93c [new file with mode: 0644]
tests-clar/resources/short_tag.git/objects/4d/5fcadc293a348e88f777dc0920f11e7d71441c [new file with mode: 0644]
tests-clar/resources/short_tag.git/objects/5d/a7760512a953e3c7c4e47e4392c7a4338fb729 [new file with mode: 0644]
tests-clar/resources/short_tag.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 [new file with mode: 0644]
tests-clar/resources/short_tag.git/packed-refs [new file with mode: 0644]
tests-clar/resources/short_tag.git/refs/heads/master [new file with mode: 0644]