File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -109,17 +109,17 @@ module GitUpdate
109109 g = Git . open ( working_dir , :log => logger )
110110 @git_dir = File . join working_dir , '.git'
111111
112- if $params[ :fetch ] . value
112+ if $params[ :fetch ] . value or $params [ :fetchonly ] . value
113113 fetch g , working_dir
114114 end
115115
116- g . branches . local . each do | branch |
117- if not branch . current or git_svn_repo g
116+ if not $params [ :fetchonly ] . value
117+ g . branches . local . each do | branch |
118118 push_or_pull g , working_dir , branch
119119 end
120- end
121120
122- status working_dir
121+ status working_dir
122+ end
123123 end
124124end
125125
@@ -133,6 +133,9 @@ Main {
133133 option ( :fetch ) {
134134 description 'Fetch from all remotes'
135135 }
136+ option ( :fetchonly ) {
137+ description 'Only fetch, nothing else'
138+ }
136139 option ( :untracked ) {
137140 description 'Display untracked files as possible changes'
138141 }
You can’t perform that action at this time.
0 commit comments