bash prompt: use bash builtins to check stash state
[gitweb.git] / t / t9903-bash-prompt.sh
index 0d53aa6d6948640d287bc514ae9b001cfbf71a42..c05458cbe671b4881af3596d9b06a120674519d7 100755 (executable)
@@ -49,6 +49,14 @@ test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '
        test_cmp expected "$actual"
 '
 
+test_expect_success 'prompt - unborn branch' '
+       printf " (unborn)" >expected &&
+       git checkout --orphan unborn &&
+       test_when_finished "git checkout master" &&
+       __git_ps1 >"$actual" &&
+       test_cmp expected "$actual"
+'
+
 test_expect_success 'prompt - detached head' '
        printf " ((%s...))" $(git log -1 --format="%h" --abbrev=13 b1^) >expected &&
        test_config core.abbrev 13 &&
@@ -320,6 +328,7 @@ test_expect_success 'prompt - stash status indicator - stash' '
        echo 2 >file &&
        git stash &&
        test_when_finished "git stash drop" &&
+       git pack-refs --all &&
        (
                GIT_PS1_SHOWSTASHSTATE=y &&
                __git_ps1 >"$actual"