diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-03-28 14:13:50 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-03-28 14:13:50 -0700 |
| commit | bf0a35206910c67e840b5c5272cfe03a266b4eba (patch) | |
| tree | d3c2bd83627f9fc876c2ea384721618fe589899c /t | |
| parent | 396430b5a73f60acc2ce8365a9edfe6923014ca3 (diff) | |
| parent | f66e1a071bd66e64160d9e73428d6cd7bdcff84e (diff) | |
| download | git-bf0a35206910c67e840b5c5272cfe03a266b4eba.tar.xz | |
Merge branch 'jc/show-untracked-false'
The status.showUntrackedFiles configuration variable had a name
that tempts users to set a Boolean value expressed in our usual
"false", "off", and "0", but it only took "no". This has been
corrected so "true" and its synonyms are taken as "normal", while
"false" and its synonyms are taken as "no".
* jc/show-untracked-false:
status: allow --untracked=false and friends
status: unify parsing of --untracked= and status.showUntrackedFiles
Diffstat (limited to 't')
| -rwxr-xr-x | t/t7508-status.sh | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh index a3c18a4fc2..e9afa59968 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -419,14 +419,19 @@ Changes not staged for commit: Untracked files not listed (use -u option to show untracked files) EOF git status -uno >output && + test_cmp expect output && + git status -ufalse >output && test_cmp expect output ' -test_expect_success 'status (status.showUntrackedFiles no)' ' - test_config status.showuntrackedfiles no && - git status >output && - test_cmp expect output -' +for no in no false 0 +do + test_expect_success "status (status.showUntrackedFiles $no)" ' + test_config status.showuntrackedfiles "$no" && + git status >output && + test_cmp expect output + ' +done test_expect_success 'status -uno (advice.statusHints false)' ' cat >expect <<EOF && @@ -488,14 +493,21 @@ Untracked files: EOF git status -unormal >output && + test_cmp expect output && + git status -utrue >output && + test_cmp expect output && + git status -uyes >output && test_cmp expect output ' -test_expect_success 'status (status.showUntrackedFiles normal)' ' - test_config status.showuntrackedfiles normal && - git status >output && - test_cmp expect output -' +for normal in normal true 1 +do + test_expect_success "status (status.showUntrackedFiles $normal)" ' + test_config status.showuntrackedfiles $normal && + git status >output && + test_cmp expect output + ' +done cat >expect <<EOF M dir1/modified |
