aboutsummaryrefslogtreecommitdiffstats
path: root/git-snapsign
diff options
context:
space:
mode:
Diffstat (limited to 'git-snapsign')
-rwxr-xr-xgit-snapsign10
1 files changed, 10 insertions, 0 deletions
diff --git a/git-snapsign b/git-snapsign
index c1dce21..2643167 100755
--- a/git-snapsign
+++ b/git-snapsign
@@ -90,6 +90,15 @@ check_format() {
fi
}
+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
+ git fetch >/dev/null 2>&1
+ else
+ git fetch >/dev/null 2>&1
+ fi
+}
+
#---------
# core
#---------
@@ -135,6 +144,7 @@ while getopts ":dfPhvF:s:p:t:" opt; do
keyid="$OPTARG"
;;
t)
+ check_notes "$@"
if ! git rev-parse --verify "${OPTARG}" >/dev/null 2>&1; then
echo -e "fatal: failed to verify tag: ${OPTARG}"
exit 1