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:
Robby Russell
2026-09-06 08:38:58 -07:00
committed by GitHub
co-authored by Copilot Autofix powered by AI
parent 40323d0e37
commit a8da200b18
+4 -2
View File
@@ -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" ]]
}