[PATCH] Update git-tag-script to create the .git/refs/tags if it does not already...
[git.git] / git-tag-script
index 442a243..aee4891 100755 (executable)
@@ -20,5 +20,6 @@ grep -v '^#' < .editmsg | git-stripspace > .tagmsg
 ( echo -e "object $object\ntype $type\ntag $name\n"; cat .tagmsg ) > .tmp-tag
 rm -f .tmp-tag.asc .tagmsg
 gpg -bsa .tmp-tag && cat .tmp-tag.asc >> .tmp-tag
+mkdir -p "$GIT_DIR/refs/tags"
 git-mktag < .tmp-tag > "$GIT_DIR/refs/tags/$name"
 #rm .tmp-tag .tmp-tag.sig