Class: MGit::FetchCommand
Instance Method Summary
collapse
Methods inherited from Command
execute, instance_each, list, register_alias, register_command
Methods included from Output
#perror, #pinfo, #ptable, #pwarn
Instance Method Details
#arity ⇒ Object
12
13
14
|
# File 'lib/mgit/commands/fetch.rb', line 12
def arity
[nil, 0]
end
|
#description ⇒ Object
20
21
22
|
# File 'lib/mgit/commands/fetch.rb', line 20
def description
'fetch all remote repositories'
end
|
#execute(args) ⇒ Object
3
4
5
6
7
8
9
10
|
# File 'lib/mgit/commands/fetch.rb', line 3
def execute(args)
Registry.chdir_each do |repo|
`git remote`.split.each do |remote|
pinfo "Fetching #{remote} in repository #{repo.name}..."
`git fetch #{remote}`
end
end
end
|
#usage ⇒ Object
16
17
18
|
# File 'lib/mgit/commands/fetch.rb', line 16
def usage
'fetch'
end
|