diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-06-26 19:29:49 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-26 19:29:49 +0300 |
commit | 8d5c5a05d7abd67f8b667c888fe17783e1d676a5 (patch) | |
tree | db512ef532bac47e2861f8b6ff680c2d72b58a93 /t | |
parent | 94486b6763c29144c60932829a65fec0597e17b3 (diff) | |
parent | be3d65434323f7f00a5abed6dbcfe690cde648b8 (diff) |
Merge branch 'jk/commit-use-no-divider-with-interpret-trailers'
When "git commit --trailer=..." invokes the interpret-trailers
machinery, it knows what it feeds to interpret-trailers is a full
log message without any patch, but failed to express that by
passing the "--no-divider" option, which has been corrected.
* jk/commit-use-no-divider-with-interpret-trailers:
commit: pass --no-divider to interpret-trailers
Diffstat (limited to 't')
-rwxr-xr-x | t/t7502-commit-porcelain.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7502-commit-porcelain.sh b/t/t7502-commit-porcelain.sh index 38a532d81c..b5bf7de7cd 100755 --- a/t/t7502-commit-porcelain.sh +++ b/t/t7502-commit-porcelain.sh @@ -466,6 +466,25 @@ test_expect_success 'commit --trailer with -c and command' ' test_cmp expected actual ' +test_expect_success 'commit --trailer not confused by --- separator' ' + cat >msg <<-\EOF && + subject + + body with dashes + --- + in it + EOF + git commit --allow-empty --trailer="my-trailer: value" -F msg && + { + cat msg && + echo && + echo "my-trailer: value" + } >expected && + git cat-file commit HEAD >commit.msg && + sed -e "1,/^\$/d" commit.msg >actual && + test_cmp expected actual +' + test_expect_success 'multiple -m' ' >negative && |