diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2016-03-19 08:00:51 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-03-01 01:24:18 +0100 |
commit | 6251fa3722c0376da5dd5baff4176a81e4c72e95 (patch) | |
tree | 195052ee6b70ab91daaaf7e76b7100aeb8cbeeb8 | |
parent | 74b69f3014210c980a1ea3bfe44831fbbfa682ad (diff) | |
download | hlupak-6251fa3722c0376da5dd5baff4176a81e4c72e95.tar.gz |
fix(git-svn-fix-tags): Modern git svn doesn't have svn subref
-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 |