summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-28 09:33:12 -0700
committerJunio C Hamano <gitster@pobox.com>2015-03-28 09:33:12 -0700
commit245dd15aa9e086d82de7a9c947aa916e6d702f48 (patch)
treebee5875fb5f87b22c493440869b36fbc1eabf013 /t
parentb70cec0a2e8636c12617b38255c7ad2bb90f5cc9 (diff)
parent9bdc5173f0bc514d0b76165d45729622b2ad4d89 (diff)
downloadgit-245dd15aa9e086d82de7a9c947aa916e6d702f48.tar.gz
Merge branch 'ct/prompt-untracked-fix' into maint
The prompt script (in contrib/) did not show the untracked sign when working in a subdirectory without any untracked files. * ct/prompt-untracked-fix: git prompt: use toplevel to find untracked files
Diffstat (limited to 't')
-rwxr-xr-xt/t9903-bash-prompt.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 51ecd3e4c1..46d7d37a51 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -397,6 +397,17 @@ test_expect_success 'prompt - untracked files status indicator - untracked files
test_cmp expected "$actual"
'
+test_expect_success 'prompt - untracked files status indicator - untracked files outside cwd' '
+ printf " (master %%)" >expected &&
+ (
+ mkdir -p ignored_dir &&
+ cd ignored_dir &&
+ GIT_PS1_SHOWUNTRACKEDFILES=y &&
+ __git_ps1 >"$actual"
+ ) &&
+ test_cmp expected "$actual"
+'
+
test_expect_success 'prompt - untracked files status indicator - shell variable unset with config disabled' '
printf " (master)" >expected &&
test_config bash.showUntrackedFiles false &&