Fetch git notes correctly

This commit is contained in:
Lance Vick 2023-04-05 15:38:12 -07:00
parent bcc863d5b1
commit c18f9d36ea
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ The simple multisig toolchain for git repos.
Consider using the following one liner which is much faster to review:
```
git fetch origin refs/notes/signatures
git fetch origin refs/notes/signatures:refs/notes/signatures
while read -r line; do \
gpg --verify \
<(printf "$line" | sed 's/.*pgp://g'| openssl base64 -d -A) \

View File

@ -467,6 +467,7 @@ cmd_verify() {
--) shift; break ;;
esac done
git fetch "$remote" refs/notes/signatures:refs/notes/signatures
local -r head=$(git rev-parse --short HEAD)
if [ -n "$diff" ] && [ -z "$ref" ]; then
while read -r commit; do
@ -556,7 +557,7 @@ cmd_push() {
-r|--remote) remote="$2"; shift 2 ;;
--) shift; break ;;
esac done
git fetch "$remote" refs/notes/signatures:refs/notes/"${remote}"/signatures
git fetch "$remote" refs/notes/signatures:refs/notes/signatures
git notes --ref signatures merge -s cat_sort_uniq "${remote}"/signatures
git push --tags "$remote" refs/notes/signatures
}