aboutsummaryrefslogtreecommitdiffstats
path: root/git-svn-fix-tags.sh
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2016-03-19 08:00:51 +0100
committerMatěj Cepl <mcepl@cepl.eu>2024-03-01 01:24:18 +0100
commit6251fa3722c0376da5dd5baff4176a81e4c72e95 (patch)
tree195052ee6b70ab91daaaf7e76b7100aeb8cbeeb8 /git-svn-fix-tags.sh
parent74b69f3014210c980a1ea3bfe44831fbbfa682ad (diff)
downloadhlupak-6251fa3722c0376da5dd5baff4176a81e4c72e95.tar.gz
fix(git-svn-fix-tags): Modern git svn doesn't have svn subref
Diffstat (limited to 'git-svn-fix-tags.sh')
-rwxr-xr-xgit-svn-fix-tags.sh8
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