diff options
Diffstat (limited to 't/t5302-pack-index.sh')
-rwxr-xr-x | t/t5302-pack-index.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index 4bbb718751..3dc5ec4dd3 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -243,4 +243,23 @@ test_expect_success 'running index-pack in the object store' ' test -f .git/objects/pack/pack-${pack1}.idx ' +test_expect_success 'index-pack --strict warns upon missing tagger in tag' ' + sha=$(git rev-parse HEAD) && + cat >wrong-tag <<EOF && +object $sha +type commit +tag guten tag + +This is an invalid tag. +EOF + + tag=$(git hash-object -t tag -w --stdin <wrong-tag) && + pack1=$(echo $tag $sha | git pack-objects tag-test) && + echo remove tag object && + thirtyeight=${tag#??} && + rm -f .git/objects/${tag%$thirtyeight}/$thirtyeight && + git index-pack --strict tag-test-${pack1}.pack 2>err && + grep "^warning:.* expected .tagger. line" err +' + test_done |