mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
Compare commits
2 Commits
971fa9a052
...
374dfecef1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
374dfecef1 | ||
|
|
bfb0e05ffa |
@ -474,9 +474,12 @@ __git_ps1 ()
|
||||
|
||||
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
|
||||
# symlink symbolic ref
|
||||
b="$(git symbolic-ref HEAD 2>/dev/null)"
|
||||
b="$(git symbolic-ref --short HEAD 2>/dev/null)"
|
||||
else
|
||||
local head=""
|
||||
if ! __git_eread "$g/HEAD" head; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user