Class: Git::Lib

Inherits:
Object
  • Object
show all
Defined in:
lib/mumukit/sync/store/github/git_lib.rb

Instance Method Summary collapse

Instance Method Details

#remove(path = '.', opts = {}) ⇒ Object

Monkey patch to add –ignore-unmatch option



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/mumukit/sync/store/github/git_lib.rb', line 3

def remove(path = '.', opts = {})
  arr_opts = %w(-f --ignore-unmatch)
  arr_opts << ['-r'] if opts[:recursive]
  arr_opts << '--'
  if path.is_a?(Array)
    arr_opts += path
  else
    arr_opts << path
  end
  command('rm', arr_opts)
end