summaryrefslogtreecommitdiff
path: root/git-tag-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-25 22:23:53 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-25 22:23:53 (GMT)
commit65f0d0ee4627dd0f0468ceded38677076d78feb5 (patch)
tree7eca7da44683b6eca9194768f44a6cff1ab7fd81 /git-tag-script
parent56ce69f7afa6d7ce2f33a1173c143a1b89bb9663 (diff)
downloadgit-65f0d0ee4627dd0f0468ceded38677076d78feb5.zip
git-65f0d0ee4627dd0f0468ceded38677076d78feb5.tar.gz
git-65f0d0ee4627dd0f0468ceded38677076d78feb5.tar.bz2
Add example "git-tag-script" to show how to create signed tag objects.
Diffstat (limited to 'git-tag-script')
-rwxr-xr-xgit-tag-script8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-tag-script b/git-tag-script
new file mode 100755
index 0000000..233491b
--- /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