aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fsck.c2
-rwxr-xr-xt/t3800-mktag.sh6
2 files changed, 4 insertions, 4 deletions
diff --git a/fsck.c b/fsck.c
index 9c3a5942d2..69d0049e4d 100644
--- a/fsck.c
+++ b/fsck.c
@@ -987,6 +987,8 @@ int fsck_tag_standalone(const struct object_id *oid, const char *buffer,
}
else
ret = fsck_ident(&buffer, oid, OBJ_TAG, options);
+ if (!*buffer)
+ goto done;
if (!starts_with(buffer, "\n")) {
/*
diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh
index 929bb9f492..1fd97def33 100755
--- a/t/t3800-mktag.sh
+++ b/t/t3800-mktag.sh
@@ -446,7 +446,7 @@ tagger T A Gger <tagger@example.com> 1206478233 -0500
EOF
-test_expect_mktag_success 'require a blank line before an empty body (1)'
+test_expect_mktag_success 'allow a blank line before an empty body (1)'
cat >tag.sig <<EOF
object $head
@@ -455,8 +455,7 @@ tag mytag
tagger T A Gger <tagger@example.com> 1206478233 -0500
EOF
-check_verify_failure 'require a blank line before an empty body (2)' \
- '^error:.* extraHeaderEntry:'
+test_expect_mktag_success 'allow no blank line before an empty body (2)'
############################################################
# 24. create valid tag
@@ -466,7 +465,6 @@ object $head
type commit
tag mytag
tagger T A Gger <tagger@example.com> 1206478233 -0500
-
EOF
test_expect_mktag_success 'create valid tag object'