diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-06-22 14:32:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-22 14:32:27 -0700 |
commit | 1947bdbc31e8e1419bdfe90d2357c68919189c30 (patch) | |
tree | dab40c45b1af3b48ea1fbe1c3d27317fd5e80af8 /t | |
parent | 66915b5d7cc9b66bf8c452bb62c67da371c21d90 (diff) | |
parent | d6293d1f2cadcdf45f8ada7847a32b51fa5bf0a6 (diff) | |
download | git-1947bdbc31e8e1419bdfe90d2357c68919189c30.tar.gz git-1947bdbc31e8e1419bdfe90d2357c68919189c30.tar.xz |
Merge branch 'mo/status-untracked'
* mo/status-untracked:
Add configuration option for default untracked files mode
Add argument 'no' commit/status option -u|--untracked-files
Add an optional <mode> argument to commit/status -u|--untracked-files option
Conflicts:
Documentation/git-commit.txt
Diffstat (limited to 't')
-rwxr-xr-x | t/t7502-status.sh | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/t/t7502-status.sh b/t/t7502-status.sh index 80a438d4d..38a48b57c 100755 --- a/t/t7502-status.sh +++ b/t/t7502-status.sh @@ -67,6 +67,104 @@ 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 +' + +test_expect_success 'status (status.showUntrackedFiles no)' ' + git config status.showuntrackedfiles no + git status >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/ +# expect +# output +# untracked +EOF +test_expect_success 'status -unormal' ' + git status -unormal >output && + test_cmp expect output +' + +test_expect_success 'status (status.showUntrackedFiles normal)' ' + git config status.showuntrackedfiles normal + git status >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 && + test_cmp expect output +' +test_expect_success 'status (status.showUntrackedFiles all)' ' + git config status.showuntrackedfiles all + git status >output && + rm -rf dir3 && + git config --unset status.showuntrackedfiles && + test_cmp expect output +' + cat > expect << \EOF # On branch master # Changes to be committed: |