summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-09-26 16:09:17 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-26 16:09:17 -0700
commite447d3182cf77f45402b6fc8a357a2ab466c49dd (patch)
tree9b5417e988a2a3bb423177d47c496d6c804bd00d /t
parentMerge branch 'ep/doc-check-ref-format-example' (diff)
parentformat-patch: add "--rfc" for the common case of [RFC PATCH] (diff)
downloadtgif-e447d3182cf77f45402b6fc8a357a2ab466c49dd.tar.xz
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')
-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 8d90a6e500..ba4902df2b 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
'