diff options
author | Brandon Casey <drafnel@gmail.com> | 2013-02-12 14:17:39 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-12 23:30:21 +0400 |
commit | 959a26231f53b9cc7da40d36c550aef193647731 (patch) | |
tree | 8b66f4f59a4241e848312ba9a02a554effc54a63 /t/t4014-format-patch.sh | |
parent | 5289c56a72efc6e5e4409c7a3802fc54aea09340 (diff) |
Unify appending signoff in format-patch, commit and sequencer
There are two implementations of append_signoff in log-tree.c and
sequencer.c, which do more or less the same thing. Unify on top of the
sequencer.c implementation.
Add a test in t4014 to demonstrate support for non-s-o-b elements in the
commit footer provided by sequence.c:append_sob. Mark tests fixed as
appropriate.
[Commit message mostly stolen from Nguyễn Thái Ngọc Duy's original
unification patch]
Signed-off-by: Brandon Casey <bcasey@nvidia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-x | t/t4014-format-patch.sh | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 0ed899f0f2..95af73f596 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1045,7 +1045,28 @@ EOF test_cmp expected actual ' -test_expect_failure 'signoff: some random signoff-alike' ' +test_expect_success 'signoff: misc conforming footer elements' ' + append_signoff <<\EOF >actual && +subject + +body + +Signed-off-by: my@house +(cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709) +Tested-by: Some One <someone@example.com> +Bug: 1234 +EOF + cat >expected <<\EOF && +4:Subject: [PATCH] subject +8: +10: +11:Signed-off-by: my@house +15:Signed-off-by: C O Mitter <committer@example.com> +EOF + test_cmp expected actual +' + +test_expect_success 'signoff: some random signoff-alike' ' append_signoff <<\EOF >actual && subject @@ -1061,7 +1082,7 @@ EOF test_cmp expected actual ' -test_expect_failure 'signoff: not really a signoff' ' +test_expect_success 'signoff: not really a signoff' ' append_signoff <<\EOF >actual && subject @@ -1077,7 +1098,7 @@ EOF test_cmp expected actual ' -test_expect_failure 'signoff: not really a signoff (2)' ' +test_expect_success 'signoff: not really a signoff (2)' ' append_signoff <<\EOF >actual && subject @@ -1094,7 +1115,7 @@ EOF test_cmp expected actual ' -test_expect_failure 'signoff: valid S-o-b paragraph in the middle' ' +test_expect_success 'signoff: valid S-o-b paragraph in the middle' ' append_signoff <<\EOF >actual && subject @@ -1162,7 +1183,7 @@ EOF test_cmp expected actual ' -test_expect_failure 'signoff: detect garbage in non-conforming footer' ' +test_expect_success 'signoff: detect garbage in non-conforming footer' ' append_signoff <<\EOF >actual && subject |