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>
This commit is contained in:

committed by
Junio C Hamano

parent
03300c0ac0
commit
4bfee30a98
@ -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:
|
||||
|
Reference in New Issue
Block a user