Class: MGit::FetchCommand
Defined Under Namespace
Classes: NullThread
Instance Method Summary
collapse
Methods inherited from Command
#check_arity, create, execute, instance_each, list, load_commands, register_alias, register_command, require_commands_from_directory
Methods included from Output
#perror, #pinfo, #psystem, #ptable, #pwarn
Instance Method Details
#arity ⇒ Object
15
16
17
|
# File 'lib/mgit/commands/fetch.rb', line 15
def arity
[nil, 0]
end
|
#description ⇒ Object
23
24
25
|
# File 'lib/mgit/commands/fetch.rb', line 23
def description
'fetch all remote repositories'
end
|
#execute(_) ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/mgit/commands/fetch.rb', line 5
def execute(_)
thread_class = Configuration.threads ? Thread : NullThread
threads = Registry.map do |repo|
thread_class.new { fetch(repo) }
end
threads.each { |t| t.join }
end
|
#usage ⇒ Object
19
20
21
|
# File 'lib/mgit/commands/fetch.rb', line 19
def usage
'fetch'
end
|