Code

Merge branch 'gp/gitweb'
[git.git] / t / t7502-status.sh
index b64ce30ff1c28a44b24eb6dd07a2cd9e260e0326..cd08516e6de6b5c4b39ffee14302d76c99229825 100755 (executable)
@@ -33,7 +33,7 @@ test_expect_success 'setup' '
 
 test_expect_success 'status (1)' '
 
-       grep -e "use \"git rm --cached <file>\.\.\.\" to unstage" output
+       grep "use \"git rm --cached <file>\.\.\.\" to unstage" output
 
 '
 
@@ -128,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