From b69fbe799379b9cec367c575cee41c4f473e01d7 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <niko@krismer.de> Date: Fri, 22 Nov 2013 12:54:56 +0100 Subject: [PATCH] Fixing problem with already existing tags --- update_mirror.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/update_mirror.sh b/update_mirror.sh index 91b99c2..b6884bb 100755 --- a/update_mirror.sh +++ b/update_mirror.sh @@ -39,7 +39,9 @@ if git config --get svn-remote.svn.url &> /dev/null;then git for-each-ref --format="%(objectname:short) %(refname)" refs/remotes/tags | while read ref; do objectname=$(echo $ref | cut -d " " -f 1) tagname=$(echo $ref | cut -d " " -f 2 | cut -d / -f 4) - GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a $tagname -m "import '$tagname' tag from svn" $objectname + if [ ! git show-ref --tags | egrep -q "refs/tags/$tagname$"]; then + GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a $tagname -m "import '$tagname' tag from svn" $objectname + fi done cd .git -- GitLab