support alternative git origins

This commit is contained in:
Lance Vick 2023-03-29 14:51:54 -07:00
parent 170f49083b
commit 72a7267a22
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 10 additions and 4 deletions

14
sig
View File

@ -549,10 +549,16 @@ cmd_add(){
}
cmd_push() {
[ "$#" -eq 0 ] || { usage push; exit 1; }
git fetch origin refs/notes/signatures:refs/notes/origin/signatures
git notes --ref signatures merge -s cat_sort_uniq origin/signatures
git push --tags origin refs/notes/signatures
local opts remote="origin" push="0"
opts="$(getopt -o r: -l remote: -n "$PROGRAM" -- "$@")"
eval set -- "$opts"
while true; do case $1 in
-r|--remote) remote="$2"; shift 2 ;;
--) shift; break ;;
esac done
git fetch "$remote" refs/notes/signatures:refs/notes/"${remote}"/signatures
git notes --ref signatures merge -s cat_sort_uniq "${remote}"/signatures
git push --tags "$remote" refs/notes/signatures
}
cmd_version() {