From 823e3f00bcde13ecbf0b2be3c2111c43e99ca774 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <niko@krismer.de> Date: Tue, 12 Nov 2013 15:55:21 +0100 Subject: [PATCH] #4 fixed Adding ability to mirror tags in svn repository --- update_mirror.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/update_mirror.sh b/update_mirror.sh index 073d75d..50cd7af 100755 --- a/update_mirror.sh +++ b/update_mirror.sh @@ -35,6 +35,12 @@ if git config --get svn-remote.svn.url &> /dev/null;then git reset --hard git svn fetch git svn rebase + 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 + done + cd .git git config --bool core.bare true #bug fix for when gitlab is off-line during a cron job the bare setting gets set back to false when the git command fails -- GitLab