diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:27:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:27:41 -0800 |
commit | 1cb4b3d380fe42a837adfb68126a312f605680f8 (patch) | |
tree | a3051c8af64dda52e0c1b0c9826afa0d2d66515c /fsck.c | |
parent | Merge branch 'po/doc-assume-unchanged' (diff) | |
parent | index-pack: terminate object buffers with NUL (diff) | |
download | tgif-1cb4b3d380fe42a837adfb68126a312f605680f8.tar.xz |
Merge branch 'js/fsck-tag-validation'
New tag object format validation added in 2.2 showed garbage
after a tagname it reported in its error message.
* js/fsck-tag-validation:
index-pack: terminate object buffers with NUL
fsck: properly bound "invalid tag name" error message
Diffstat (limited to 'fsck.c')
-rw-r--r-- | fsck.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -426,7 +426,8 @@ static int fsck_tag_buffer(struct tag *tag, const char *data, } strbuf_addf(&sb, "refs/tags/%.*s", (int)(eol - buffer), buffer); if (check_refname_format(sb.buf, 0)) - error_func(&tag->object, FSCK_WARN, "invalid 'tag' name: %s", buffer); + error_func(&tag->object, FSCK_WARN, "invalid 'tag' name: %.*s", + (int)(eol - buffer), buffer); buffer = eol + 1; if (!skip_prefix(buffer, "tagger ", &buffer)) |