diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-25 12:54:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-25 12:54:18 -0700 |
commit | 5f15cba2f95f5678fc69bd305dbbb778e1fad579 (patch) | |
tree | d2dd6c4b1667f5c3d58f0341e37b62d1a9f848a4 /t | |
parent | Merge branch 'master' of git://ozlabs.org/~paulus/gitk (diff) | |
parent | git prompt: use toplevel to find untracked files (diff) | |
download | tgif-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-x | t/t9903-bash-prompt.sh | 11 |
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 && |