Skip to content

Commit d1d3848

Browse files
Corner, Bradleysergiomb2
authored andcommitted
Make -r parameter also available in combination with --rebase.
1 parent b1559ba commit d1d3848

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/svn2git/migration.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,14 @@ def fix_branches
330330
svn_branches.delete_if { |b| b.strip !~ %r{^svn\/} }
331331

332332
if @options[:rebase]
333-
run_command("git svn fetch", true, true)
333+
revision = @options[:revision]
334+
cmd = "git svn fetch "
335+
unless revision.nil?
336+
range = revision.split(":")
337+
range[1] = "HEAD" unless range[1]
338+
cmd += "-r #{range[0]}:#{range[1]} "
339+
end
340+
run_command(cmd, true, true)
334341
end
335342

336343
svn_branches.each do |branch|

0 commit comments

Comments
 (0)