From: Linus Torvalds Date: Mon, 25 Apr 2005 22:23:53 +0000 (-0700) Subject: Add example "git-tag-script" to show how to create signed tag objects. X-Git-Tag: v0.99~746 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=65f0d0ee4627dd0f0468ceded38677076d78feb5;p=git.git Add example "git-tag-script" to show how to create signed tag objects. --- diff --git a/git-tag-script b/git-tag-script new file mode 100755 index 00000000..233491bc --- /dev/null +++ b/git-tag-script @@ -0,0 +1,8 @@ +#!/bin/sh +object=${2:-$(cat .git/HEAD)} +type=$(cat-file -t $object) || exit 1 +( echo -e "object $object\ntype $type\ntag $1\n"; cat ) > .tmp-tag +rm -f .tmp-tag.asc +gpg -bsa .tmp-tag && cat .tmp-tag.asc >> .tmp-tag +git-mktag < .tmp-tag +#rm .tmp-tag .tmp-tag.sig