diff options
author | Marius Storm-Olsen <marius@trolltech.com> | 2008-06-05 10:31:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-09 15:47:36 -0700 |
commit | 4bfee30a98783f7987c395e6006a2a6717344c04 (patch) | |
tree | be271112c0ae4349d73deca32f926f2b024fe425 /t | |
parent | 03300c0ac0dfd6098ff65cff518bfffb05ae4194 (diff) | |
download | git-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-x | t/t7502-status.sh | 61 |
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: |