Cleanup the x-allocation functions
[git/gitweb.git] / git-tag-script
blob281d192814ec200199379f44fef10d2b04f762c1
1 #!/bin/sh
2 # Copyright (c) 2005 Linus Torvalds
4 : ${GIT_DIR=.git}
6 object=${2:-$(cat "$GIT_DIR"/HEAD)}
7 type=$(git-cat-file -t $object) || exit 1
8 ( echo -e "object $object\ntype $type\ntag $1\n"; cat ) > .tmp-tag
9 rm -f .tmp-tag.asc
10 gpg -bsa .tmp-tag && cat .tmp-tag.asc >> .tmp-tag
11 git-mktag < .tmp-tag
12 #rm .tmp-tag .tmp-tag.sig