Merge branch 'nd/status-refresh-progress'
[gitweb.git] / t / t7501-commit.sh
index 4cae92804d11f75f24bdd6f6517a88c834e7cfc7..f1349af56edd17483120a1e177c70282759778d3 100755 (executable)
@@ -99,12 +99,12 @@ test_expect_success '--dry-run with stuff to commit returns ok' '
        git commit -m next -a --dry-run
 '
 
-test_expect_failure '--short with stuff to commit returns ok' '
+test_expect_success '--short with stuff to commit returns ok' '
        echo bongo bongo bongo >>file &&
        git commit -m next -a --short
 '
 
-test_expect_failure '--porcelain with stuff to commit returns ok' '
+test_expect_success '--porcelain with stuff to commit returns ok' '
        echo bongo bongo bongo >>file &&
        git commit -m next -a --porcelain
 '
@@ -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 &&
@@ -682,4 +698,10 @@ test_expect_success '--dry-run with conflicts fixed from a merge' '
        git commit -m "conflicts fixed from merge."
 '
 
+test_expect_success '--dry-run --short' '
+       >test-file &&
+       git add test-file &&
+       git commit --dry-run --short
+'
+
 test_done