Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0a8db6

Browse files
committed
- Fixed a defect so that no tags were found by git tag -l and all branches like tags/xxx were still found after migration using the tags option with a non-standard name like releases because git-svn already made branches named like tags/xxx even though any tag was specified.
1 parent 06082cb commit e0a8db6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/svn2git/migration.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def clone!
6161

6262
def get_branches
6363
@remote = `git branch -r`.split(/\n/)
64-
@tags = @remote.find_all { |b| b.strip =~ %r{^#{@options[:tags]}\/} }
64+
@tags = @remote.find_all { |b| b.strip =~ %r{^tags\/} }
6565
end
6666

6767
def fix_tags
6868
@tags.each do |tag|
69-
id = tag.strip.gsub(%r{^#{@options[:tags]}\/}, '')
69+
id = tag.strip.gsub(%r{^tags\/}, '')
7070
subject = `git log -1 --pretty=format:"%s" #{tag.strip()}`
7171
date = `git log -1 --pretty=format:"%ci" #{tag.strip()}`
7272
`export GIT_COMMITER_DATE="#{date}"`

0 commit comments

Comments
 (0)