Code

Merge branch 'maint-1.5.4' into maint
[git.git] / t / t7502-status.sh
index 9ce50cade8981bb5317397c10b0fabeba4893fc8..cd08516e6de6b5c4b39ffee14302d76c99229825 100755 (executable)
@@ -17,6 +17,9 @@ test_expect_success 'setup' '
        : > dir1/tracked &&
        : > dir1/modified &&
        git add . &&
+
+       git status >output &&
+
        test_tick &&
        git commit -m initial &&
        : > untracked &&
@@ -28,6 +31,12 @@ test_expect_success 'setup' '
        git add dir2/added
 '
 
+test_expect_success 'status (1)' '
+
+       grep "use \"git rm --cached <file>\.\.\.\" to unstage" output
+
+'
+
 cat > expect << \EOF
 # On branch master
 # Changes to be committed:
@@ -51,7 +60,7 @@ cat > expect << \EOF
 #      untracked
 EOF
 
-test_expect_success 'status' '
+test_expect_success 'status (2)' '
 
        git status > output &&
        git diff expect output
@@ -119,4 +128,25 @@ test_expect_success 'status without relative paths' '
 
 '
 
+cat <<EOF >expect
+# On branch master
+# Changes to be committed:
+#   (use "git reset HEAD <file>..." to unstage)
+#
+#      modified:   dir1/modified
+#
+# Untracked files:
+#   (use "git add <file>..." to include in what will be committed)
+#
+#      dir1/untracked
+#      dir2/
+#      expect
+#      output
+#      untracked
+EOF
+test_expect_success 'status of partial commit excluding new file in index' '
+       git status dir1/modified >output &&
+       test_cmp expect output
+'
+
 test_done