summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tag.c b/src/tag.c
index c4bce1f22..fe840fe82 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -137,8 +137,14 @@ static int tag_parse(git_tag *tag, const char *buffer, const char *buffer_end)
tag->message = NULL;
if (buffer < buffer_end) {
- if( *buffer != '\n' )
- return tag_error("No new line before message");
+ /* If we're not at the end of the header, search for it */
+ if( *buffer != '\n' ) {
+ search = strstr(buffer, "\n\n");
+ if (search)
+ buffer = search + 1;
+ else
+ return tag_error("tag contains no message");
+ }
text_len = buffer_end - ++buffer;