summaryrefslogtreecommitdiff
path: root/t/t4014-format-patch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-26 23:09:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-26 23:09:17 (GMT)
commite447d3182cf77f45402b6fc8a357a2ab466c49dd (patch)
tree9b5417e988a2a3bb423177d47c496d6c804bd00d /t/t4014-format-patch.sh
parent2a1f3fe6e3c3e21b97dc4fa488bee859289e32fd (diff)
parent68e83a5b8277adfc6f8a307bc2454bc6723717f4 (diff)
downloadgit-e447d3182cf77f45402b6fc8a357a2ab466c49dd.zip
git-e447d3182cf77f45402b6fc8a357a2ab466c49dd.tar.gz
git-e447d3182cf77f45402b6fc8a357a2ab466c49dd.tar.bz2
Merge branch 'jt/format-patch-rfc'
In some projects, it is common to use "[RFC PATCH]" as the subject prefix for a patch meant for discussion rather than application. A new option "--rfc" was a short-hand for "--subject-prefix=RFC PATCH" to help the participants of such projects. * jt/format-patch-rfc: format-patch: add "--rfc" for the common case of [RFC PATCH]
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-xt/t4014-format-patch.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 8d90a6e..ba4902d 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -1086,6 +1086,15 @@ test_expect_success 'empty subject prefix does not have extra space' '
test_cmp expect actual
'
+test_expect_success '--rfc' '
+ cat >expect <<-\EOF &&
+ Subject: [RFC PATCH 1/1] header with . in it
+ EOF
+ git format-patch -n -1 --stdout --rfc >patch &&
+ grep ^Subject: patch >actual &&
+ test_cmp expect actual
+'
+
test_expect_success '--from=ident notices bogus ident' '
test_must_fail git format-patch -1 --stdout --from=foo >patch
'