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
This commit is contained in:
Junio C Hamano
2014-12-22 12:27:41 -08:00
4 changed files with 11 additions and 6 deletions

View File

@ -229,8 +229,12 @@ test_expect_success 'tag with incorrect tag name & missing tagger' '
echo $tag >.git/refs/tags/wrong &&
test_when_finished "git update-ref -d refs/tags/wrong" &&
git fsck --tags 2>out &&
grep "invalid .tag. name" out &&
grep "expected .tagger. line" out
cat >expect <<-EOF &&
warning in tag $tag: invalid '\''tag'\'' name: wrong name format
warning in tag $tag: invalid format - expected '\''tagger'\'' line
EOF
test_cmp expect out
'
test_expect_success 'tag with bad tagger' '