bash prompt: combine 'git rev-parse' executions in the main code path
[gitweb.git] / t / t9903-bash-prompt.sh
index df36239a59b49ef701a5612e05878e2974e59da1..0d53aa6d6948640d287bc514ae9b001cfbf71a42 100755 (executable)
@@ -40,8 +40,18 @@ test_expect_success 'prompt - branch name' '
        test_cmp expected "$actual"
 '
 
+test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '
+       printf " (master)" >expected &&
+       test_when_finished "git checkout master" &&
+       test_config core.preferSymlinkRefs true &&
+       git checkout master &&
+       __git_ps1 >"$actual" &&
+       test_cmp expected "$actual"
+'
+
 test_expect_success 'prompt - detached head' '
-       printf " ((%s...))" $(git log -1 --format="%h" b1^) >expected &&
+       printf " ((%s...))" $(git log -1 --format="%h" --abbrev=13 b1^) >expected &&
+       test_config core.abbrev 13 &&
        git checkout b1^ &&
        test_when_finished "git checkout master" &&
        __git_ps1 >"$actual" &&