fix comments

This commit is contained in:
Carlo Sala
2026-09-18 14:17:05 +02:00
parent 97dfe1ae54
commit 59d7ef3171
+10
View File
@@ -138,6 +138,14 @@ _omz_git_head() {
if [[ "$head" = ref:\ * ]]; then
ref="${head#ref: }"
case "$ref" in
# These namespaces are private to each worktree and are never resolved
# from the common directory or its packed-refs file.
refs/bisect/*|refs/worktree/*|refs/rewritten/*)
[[ -r "$gitdir/$ref" ]] || return 1
read -r REPLY 2>/dev/null < "$gitdir/$ref" || return 1
;;
*)
if [[ -r "$common/$ref" ]]; then
read -r REPLY 2>/dev/null < "$common/$ref" || return 1
elif [[ -r "$common/packed-refs" ]]; then
@@ -146,6 +154,8 @@ _omz_git_head() {
else
return 1
fi
;;
esac
else
# detached HEAD: the file holds the commit itself
REPLY="$head"