diff options
| author | Edward Thomson <ethomson@github.com> | 2016-04-25 09:45:27 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@github.com> | 2016-04-25 09:45:27 -0400 |
| commit | b058297afa4667a3ed1985e44a34e8398c102b2f (patch) | |
| tree | f34949b3e3a53b513c8cffb57d971a83dcda78a4 /src | |
| parent | 512bd2c78f700186f92271e502b123ea27f75614 (diff) | |
| parent | eb39284babba00c763911b93aa9219803612b965 (diff) | |
| download | libgit2-b058297afa4667a3ed1985e44a34e8398c102b2f.tar.gz | |
Merge pull request #3752 from libgit2/cmn/silly-tags
tag: ignore extra header fields
Diffstat (limited to 'src')
| -rw-r--r-- | src/tag.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; |
