aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius@trolltech.com>2008-06-05 10:31:19 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-09 15:47:36 -0700
commit4bfee30a98783f7987c395e6006a2a6717344c04 (patch)
treebe271112c0ae4349d73deca32f926f2b024fe425 /t
parent03300c0ac0dfd6098ff65cff518bfffb05ae4194 (diff)
downloadgit-4bfee30a98783f7987c395e6006a2a6717344c04.tar.gz
git-4bfee30a98783f7987c395e6006a2a6717344c04.tar.xz
Add an optional <mode> argument to commit/status -u|--untracked-files option
This lets you specify how you want untracked files to be listed. The possible options are: normal - Show untracked files and directories all - Show all untracked files The 'all' mode is used, if the mode is not specified. Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7502-status.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/t/t7502-status.sh b/t/t7502-status.sh
index 80a438d4d..0d24e259f 100755
--- a/t/t7502-status.sh
+++ b/t/t7502-status.sh
@@ -67,6 +67,67 @@ test_expect_success 'status (2)' '
'
+cat >expect <<EOF
+# On branch master
+# Changes to be committed:
+# (use "git reset HEAD <file>..." to unstage)
+#
+# new file: dir2/added
+#
+# Changed but not updated:
+# (use "git add <file>..." to update what will be committed)
+#
+# modified: dir1/modified
+#
+# Untracked files:
+# (use "git add <file>..." to include in what will be committed)
+#
+# dir1/untracked
+# dir2/modified
+# dir2/untracked
+# dir3/
+# expect
+# output
+# untracked
+EOF
+test_expect_success 'status -unormal' '
+ mkdir dir3 &&
+ : > dir3/untracked1 &&
+ : > dir3/untracked2 &&
+ git status -unormal >output &&
+ test_cmp expect output
+'
+
+cat >expect <<EOF
+# On branch master
+# Changes to be committed:
+# (use "git reset HEAD <file>..." to unstage)
+#
+# new file: dir2/added
+#
+# Changed but not updated:
+# (use "git add <file>..." to update what will be committed)
+#
+# modified: dir1/modified
+#
+# Untracked files:
+# (use "git add <file>..." to include in what will be committed)
+#
+# dir1/untracked
+# dir2/modified
+# dir2/untracked
+# dir3/untracked1
+# dir3/untracked2
+# expect
+# output
+# untracked
+EOF
+test_expect_success 'status -uall' '
+ git status -uall >output &&
+ rm -rf dir3 &&
+ test_cmp expect output
+'
+
cat > expect << \EOF
# On branch master
# Changes to be committed: