summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sequencer.c2
-rwxr-xr-xt/t7501-commit.sh16
2 files changed, 18 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 849208eb40..51ef7245b1 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -229,6 +229,8 @@ static int has_conforming_footer(struct strbuf *sb, struct strbuf *sob,
size_t i;
int found_sob = 0, found_sob_last = 0;
+ opts.no_divider = 1;
+
trailer_info_get(&info, sb->buf, &opts);
if (info.trailer_start == info.trailer_end)
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 9dbbd01fc0..025d65b517 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -517,6 +517,22 @@ Myfooter: x" &&
test_cmp expected actual
'
+test_expect_success 'signoff not confused by ---' '
+ cat >expected <<-EOF &&
+ subject
+
+ body
+ ---
+ these dashes confuse the parser!
+
+ Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
+ EOF
+ # should be a noop, since we already signed
+ git commit --allow-empty --signoff -F expected &&
+ git log -1 --pretty=format:%B >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'multiple -m' '
>negative &&