summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-03-25 12:54:18 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-25 12:54:18 -0700
commit5f15cba2f95f5678fc69bd305dbbb778e1fad579 (patch)
treed2dd6c4b1667f5c3d58f0341e37b62d1a9f848a4 /t
parentMerge branch 'master' of git://ozlabs.org/~paulus/gitk (diff)
parentgit prompt: use toplevel to find untracked files (diff)
downloadtgif-5f15cba2f95f5678fc69bd305dbbb778e1fad579.tar.xz
Merge branch 'ct/prompt-untracked-fix'
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 &&