diff options
-rw-r--r-- | pretty.c | 2 | ||||
-rwxr-xr-x | t/t7510-signed-commit.sh | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -1267,6 +1267,8 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ if (c->signature_check.key) strbuf_addstr(sb, c->signature_check.key); break; + default: + return 0; } return 2; } diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh index e97477a3b9..9810242435 100755 --- a/t/t7510-signed-commit.sh +++ b/t/t7510-signed-commit.sh @@ -147,4 +147,10 @@ test_expect_success GPG 'show lack of signature with custom format' ' test_cmp expect actual ' +test_expect_success 'unused %G placeholders are passed through' ' + echo "%GX %G" >expect && + git log -1 --format="%GX %G" >actual && + test_cmp expect actual +' + test_done |