2005-04-26 00:23:53 +02:00
|
|
|
#!/bin/sh
|
2005-05-10 07:57:58 +02:00
|
|
|
# Copyright (c) 2005 Linus Torvalds
|
|
|
|
|
|
|
|
: ${GIT_DIR=.git}
|
|
|
|
|
|
|
|
object=${2:-$(cat "$GIT_DIR"/HEAD)}
|
2005-04-30 01:25:05 +02:00
|
|
|
type=$(git-cat-file -t $object) || exit 1
|
2005-04-26 00:23:53 +02:00
|
|
|
( 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
|