diff: demote core.safecrlf=true to core.safecrlf=warn
[gitweb.git] / t / t7102-reset.sh
index b8cf2603a195af406d3606712e45fd1195c1588f..b096dc88c2f4caf28887cf8fea5d700f0132f5a3 100755 (executable)
@@ -426,7 +426,22 @@ EOF
 test_expect_success '--mixed refreshes the index' '
        echo 123 >> file2 &&
        git reset --mixed HEAD > output &&
-       test_cmp expect output
+       test_i18ncmp expect output
+'
+
+test_expect_success 'resetting specific path that is unmerged' '
+       git rm --cached file2 &&
+       F1=$(git rev-parse HEAD:file1) &&
+       F2=$(git rev-parse HEAD:file2) &&
+       F3=$(git rev-parse HEAD:secondfile) &&
+       {
+               echo "100644 $F1 1      file2" &&
+               echo "100644 $F2 2      file2" &&
+               echo "100644 $F3 3      file2"
+       } | git update-index --index-info &&
+       git ls-files -u &&
+       test_must_fail git reset HEAD file2 &&
+       git diff-index --exit-code --cached HEAD
 '
 
 test_expect_success 'disambiguation (1)' '