mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-09-25 12:36:06 +02:00
Apply batched suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
40323d0e37
commit
a8da200b18
+4
-2
@@ -141,12 +141,14 @@ _omz_git_head() {
|
||||
|
||||
ref="${head#ref: }"
|
||||
if [[ -r "$common/$ref" ]]; then
|
||||
read -r REPLY 2>/dev/null < "$common/$ref" && return 0
|
||||
read -r REPLY 2>/dev/null < "$common/$ref" || return 1
|
||||
[[ "$REPLY" != ref:\ * ]] || return 1
|
||||
return 0
|
||||
fi
|
||||
|
||||
[[ -r "$common/packed-refs" ]] || return 1
|
||||
lines=("${(@f)$(<"$common/packed-refs")}")
|
||||
REPLY="${lines[(r)* $ref]%% *}"
|
||||
REPLY="${lines[(r)* ${(b)ref}]%% *}"
|
||||
[[ -n "$REPLY" ]]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user