Skip update checks if in detached state. Lesson learned from 2025 tag.
This commit is contained in:
@@ -26,6 +26,10 @@ update() {
|
||||
if ! [[ -d ".git" ]]; then
|
||||
return
|
||||
fi
|
||||
# Check if we're in a detached HEAD state
|
||||
if ! git symbolic-ref -q HEAD &> /dev/null; then
|
||||
return
|
||||
fi
|
||||
local url="$(git ls-remote --get-url)"
|
||||
if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user