unexpected Make output (e.g. from --debug) causes build failure
[gitweb.git] / t / t7501-commit.sh
index 8cc2cd9e60922f624e41d4397ea2778f4ade170c..b151b51a3420fdba921da16979ec4a480b61a973 100644 (file)
@@ -27,7 +27,7 @@ test_expect_success \
 
 test_expect_failure \
        "invalid options 1" \
-       "git-commit --amend -F file"
+       "git-commit -m foo -m bar -F file"
 
 test_expect_failure \
        "invalid options 2" \
@@ -78,9 +78,9 @@ test_expect_success \
        "VISUAL=./editor git-commit --amend"
 
 test_expect_failure \
-       "passing --amend and -F" \
+       "passing -m and -F" \
        "echo 'enough with the bongos' >file && \
-        git-commit -F msg --amend ."
+        git-commit -F msg -m amending ."
 
 test_expect_success \
        "using message from other commit" \
@@ -131,4 +131,36 @@ test_expect_success \
     'validate git-rev-list output.' \
     'diff current expected'
 
+test_expect_success 'partial commit that involves removal (1)' '
+
+       git rm --cached file &&
+       mv file elif &&
+       git add elif &&
+       git commit -m "Partial: add elif" elif &&
+       git diff-tree --name-status HEAD^ HEAD >current &&
+       echo "A elif" >expected &&
+       diff expected current
+
+'
+
+test_expect_success 'partial commit that involves removal (2)' '
+
+       git commit -m "Partial: remove file" file &&
+       git diff-tree --name-status HEAD^ HEAD >current &&
+       echo "D file" >expected &&
+       diff expected current
+
+'
+
+test_expect_success 'partial commit that involves removal (3)' '
+
+       git rm --cached elif &&
+       echo elif >elif &&
+       git commit -m "Partial: modify elif" elif &&
+       git diff-tree --name-status HEAD^ HEAD >current &&
+       echo "M elif" >expected &&
+       diff expected current
+
+'
+
 test_done