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
This commit is contained in:
Junio C Hamano
2023-06-26 09:29:49 -07:00
2 changed files with 21 additions and 1 deletions

View File

@@ -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 &&