4 g
="$(git rev-parse --git-dir 2>/dev/null)"
7 if [ -d "$g/../.dotest" ]
9 if test -f "$g/../.dotest/rebasing"
12 elif test -f "$g/../.dotest/applying"
18 b
="$(git symbolic-ref HEAD 2>/dev/null)"
19 elif [ -f "$g/.dotest-merge/interactive" ]
22 b
="$(cat "$g/.dotest-merge
/head-name
")"
23 elif [ -d "$g/.dotest-merge" ]
26 b
="$(cat "$g/.dotest-merge
/head-name
")"
27 elif [ -f "$g/MERGE_HEAD" ]
30 b
="$(git symbolic-ref HEAD 2>/dev/null)"
32 if [ -f "$g/BISECT_LOG" ]
36 if ! b
="$(git symbolic-ref HEAD 2>/dev/null)"
38 if ! b
="$(git describe --exact-match HEAD 2>/dev/null)"
40 b
="$(cut -c1-7 "$g/HEAD
")..."
46 printf "$1" "${b##refs/heads/}$r"
48 printf "%s" "${b##refs/heads/}$r"