mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-03 04:20:01 +02:00
Merge dd74a2d5b4 into 11c1718983
This commit is contained in:
commit
eb5216d744
1 changed files with 4 additions and 1 deletions
|
|
@ -474,9 +474,12 @@ __git_ps1 ()
|
||||||
|
|
||||||
if [ -n "$b" ]; then
|
if [ -n "$b" ]; then
|
||||||
:
|
:
|
||||||
|
# Prefer symbolic-ref short name resolution (works well with worktrees)
|
||||||
|
elif symref_short="$(git symbolic-ref --quiet --short HEAD 2>/dev/null)" && [ -n "$symref_short" ]; then
|
||||||
|
b="$symref_short"
|
||||||
elif [ -h "$g/HEAD" ]; then
|
elif [ -h "$g/HEAD" ]; then
|
||||||
# symlink symbolic ref
|
# symlink symbolic ref
|
||||||
b="$(git symbolic-ref HEAD 2>/dev/null)"
|
b="$(git symbolic-ref --short HEAD 2>/dev/null)"
|
||||||
else
|
else
|
||||||
local head=""
|
local head=""
|
||||||
if ! __git_eread "$g/HEAD" head; then
|
if ! __git_eread "$g/HEAD" head; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue