]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7502-commit-porcelain.sh
trailer: fix comment/cut-line regression with opts->no_divider
[thirdparty/git.git] / t / t7502-commit-porcelain.sh
index b5bf7de7cd66c781657173bac3074cacb1107bf1..d8e216613f74603ebfdf57b54779a51f4ca29176 100755 (executable)
@@ -485,6 +485,24 @@ test_expect_success 'commit --trailer not confused by --- separator' '
        test_cmp expected actual
 '
 
+test_expect_success 'commit --trailer with --verbose' '
+       cat >msg <<-\EOF &&
+       subject
+
+       body
+       EOF
+       GIT_EDITOR=: git commit --edit -F msg --allow-empty \
+               --trailer="my-trailer: value" --verbose &&
+       {
+               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 &&