Do not fail on hierarchical tagnames.

This is a companion patch to 13d1cc3604
commit, which made hierarchical branch name possible.  "git tag
v0.99.9/a" would fail otherwise.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2005-11-07 16:22:34 -08:00
parent 92e2eb9c0a
commit 52963a7a3f

View file

@ -92,5 +92,6 @@ if [ "$annotate" ]; then
object=$(git-mktag < "$GIT_DIR"/TAG_TMP)
fi
mkdir -p "$GIT_DIR/refs/tags"
leading=`expr "refs/tags/$name" : '\(.*\)/'` &&
mkdir -p "$GIT_DIR/$leading" &&
echo $object > "$GIT_DIR/refs/tags/$name"