From 294e9d0ec2aa05906ec10a14e2301f8d7f011017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 6 Oct 2022 09:44:52 +0800 Subject: Hotfix: check signatures into remote git repo --- git-snapsign | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/git-snapsign b/git-snapsign index 85fd9a3..a9a53b4 100644 --- a/git-snapsign +++ b/git-snapsign @@ -91,12 +91,14 @@ check_format() { } check_notes() { - if ! git show-ref --quiet --verify -- "refs/notes" >/dev/null 2>&1; then - git config --add remote.origin.fetch "+refs/notes/*:refs/notes/*" >/dev/null 2>&1 + mapfile -d '\0' signatures < <(find .git/refs/notes -type f 2>/dev/null) + if [[ $(echo ${#signatures[@]}) != 0 ]]; then git fetch >/dev/null 2>&1 else - git fetch >/dev/null 2>&1 + git config --add remote.origin.fetch "+refs/notes/*:refs/notes/*" >/dev/null 2>&1 + git fetch origin refs/notes/*:refs/notes/* >/dev/null 2>&1 fi + unset signatures } #--------- -- cgit v1.2.3