aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-10-06 09:44:52 +0800
committerJesús <heckyel@hyperbola.info>2022-10-06 09:44:52 +0800
commit294e9d0ec2aa05906ec10a14e2301f8d7f011017 (patch)
treee571abc5f73bf494a78ed7551faae4052551360d
parent3fc11c943e9dea4dc7d201df7dee38472f502956 (diff)
downloadgit-snapsign-294e9d0ec2aa05906ec10a14e2301f8d7f011017.tar.lz
git-snapsign-294e9d0ec2aa05906ec10a14e2301f8d7f011017.tar.xz
git-snapsign-294e9d0ec2aa05906ec10a14e2301f8d7f011017.zip
Hotfix: check signatures into remote git repo
-rw-r--r--git-snapsign8
1 files 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
}
#---------