File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ def initialize(args)
2222
2323 def run!
2424 if @options [ :rebase ]
25+ do_fetch if @options [ :fetch ]
2526 get_branches
2627 else
2728 clone!
@@ -43,6 +44,7 @@ def parse(args)
4344 options [ :tags ] = 'tags'
4445 options [ :exclude ] = [ ]
4546 options [ :revision ] = nil
47+ options [ :fetch ] = nil
4648
4749 if File . exists? ( File . expand_path ( DEFAULT_AUTHORS_FILE ) )
4850 options [ :authors ] = DEFAULT_AUTHORS_FILE
@@ -110,6 +112,10 @@ def parse(args)
110112 options [ :revision ] = revision
111113 end
112114
115+ opts . on ( '--fetch' , 'Before rebasing, do a git svn --fetch to pull in new branches (only valid when --rebase is specified)' ) do
116+ options [ :fetch ] = true
117+ end
118+
113119 opts . separator ""
114120
115121 # No argument, shows at tail. This will print an options summary.
@@ -178,6 +184,10 @@ def clone!
178184 get_branches
179185 end
180186
187+ def do_fetch
188+ run_command ( "git svn fetch" )
189+ end
190+
181191 def get_branches
182192 # Get the list of local and remote svn branches, taking care to ignore console color codes and ignoring
183193 # the '*' character used to indicate the currently selected branch.
You can’t perform that action at this time.
0 commit comments