Add argument 'no' commit/status option -u|--untracked-files

This new argument teaches Git to not look for any untracked files,
saving cycles on slow file systems, or large repos.

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
This commit is contained in:
Marius Storm-Olsen
2008-06-05 14:22:56 +02:00
committed by Junio C Hamano
parent 4bfee30a98
commit 6c2ce048bb
5 changed files with 34 additions and 6 deletions

View File

@@ -67,6 +67,28 @@ 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 not listed (use -u option to show untracked files)
EOF
test_expect_success 'status -uno' '
mkdir dir3 &&
: > dir3/untracked1 &&
: > dir3/untracked2 &&
git status -uno >output &&
test_cmp expect output
'
cat >expect <<EOF
# On branch master
# Changes to be committed:
@@ -91,9 +113,6 @@ cat >expect <<EOF
# untracked
EOF
test_expect_success 'status -unormal' '
mkdir dir3 &&
: > dir3/untracked1 &&
: > dir3/untracked2 &&
git status -unormal >output &&
test_cmp expect output
'