diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-31 12:09:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-31 12:09:27 -0700 |
commit | aca820ae61bc376315b6bb1aea2e0006d1d273b6 (patch) | |
tree | 744e47d6e5091fa5874d612bbaf92a11b4713f9b /t | |
parent | 15af7075fc21877320a3fcf251201b209af5253a (diff) | |
parent | e7af8e49cd54f1784fa2a0e382f22ca2f98cf4d8 (diff) | |
download | git-aca820ae61bc376315b6bb1aea2e0006d1d273b6.tar.gz git-aca820ae61bc376315b6bb1aea2e0006d1d273b6.tar.xz |
Merge branch 'jk/format-patch-empty-prefix'
* jk/format-patch-empty-prefix:
format-patch: make zero-length subject prefixes prettier
Diffstat (limited to 't')
-rwxr-xr-x | t/t4014-format-patch.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 045cee312..92248d24c 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -851,4 +851,22 @@ test_expect_success 'subject lines do not have 822 atom-quoting' ' test_cmp expect actual ' +cat >expect <<'EOF' +Subject: [PREFIX 1/1] header with . in it +EOF +test_expect_success 'subject prefixes have space prepended' ' + git format-patch -n -1 --stdout --subject-prefix=PREFIX >patch && + grep ^Subject: patch >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' +Subject: [1/1] header with . in it +EOF +test_expect_success 'empty subject prefix does not have extra space' ' + git format-patch -n -1 --stdout --subject-prefix= >patch && + grep ^Subject: patch >actual && + test_cmp expect actual +' + test_done |