summaryrefslogtreecommitdiff
path: root/git-tag.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-08 00:22:34 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-08 00:34:04 (GMT)
commit52963a7a3fad7f3da7b4ec49824d92338a2ab668 (patch)
treec0f56a070b4d5c6b68449062b030ffd3e65372c0 /git-tag.sh
parent92e2eb9c0a868348dd2caf2b923fd6542ca7ceb7 (diff)
downloadgit-52963a7a3fad7f3da7b4ec49824d92338a2ab668.zip
git-52963a7a3fad7f3da7b4ec49824d92338a2ab668.tar.gz
git-52963a7a3fad7f3da7b4ec49824d92338a2ab668.tar.bz2
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 <junkio@cox.net>
Diffstat (limited to 'git-tag.sh')
-rwxr-xr-xgit-tag.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-tag.sh b/git-tag.sh
index bd92753..6130904 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"