Hotfix: check signatures into remote git repo

This commit is contained in:
Jesús
2022-10-06 09:44:52 +08:00
parent 3fc11c943e
commit 294e9d0ec2

View File

@@ -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
}
#---------