diff options
-rwxr-xr-x | git-svn-fix-tags.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/git-svn-fix-tags.sh b/git-svn-fix-tags.sh index 2af9f14..ee4faf5 100755 --- a/git-svn-fix-tags.sh +++ b/git-svn-fix-tags.sh @@ -1,12 +1,14 @@ #!/bin/sh +set -x reponame=$(git config svn-remote.svn.url|tr '/' '\n'|tail -n1) -git for-each-ref refs/remotes/svn/tags | cut -d / -f 5- \ +#remotes/tags/release-0-7-8 +git for-each-ref refs/remotes/tags | cut -d / -f 4- \ | while read oldref do ref=$(echo $oldref|sed -e "s/$reponame-*//") echo "Converting branch $oldref to tag ${ref}." git tag -a "$ref" -m"say farewell to SVN" \ - "refs/remotes/svn/tags/$oldref" && \ - git branch -r -d "svn/tags/$oldref" >/dev/null 2>&1 + "refs/remotes/tags/$oldref" && \ + git branch -r -d "tags/$oldref" >/dev/null 2>&1 done |