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
|
if ! [[ -d ".git" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
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)"
|
local url="$(git ls-remote --get-url)"
|
||||||
if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then
|
if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user