From: Junio C Hamano Date: Tue, 8 Nov 2005 00:22:34 +0000 (-0800) Subject: Do not fail on hierarchical tagnames. X-Git-Tag: v0.99.9f~1^2~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=52963a7a3fad7f3da7b4ec49824d92338a2ab668;p=git.git Do not fail on hierarchical tagnames. This is a companion patch to 13d1cc3604a1a64cb5a6025bba8af8b74a373963 commit, which made hierarchical branch name possible. "git tag v0.99.9/a" would fail otherwise. Signed-off-by: Junio C Hamano --- diff --git a/git-tag.sh b/git-tag.sh index bd927536..6130904a 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -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"