Class: Git::Lib
- Inherits:
-
Object
- Object
- Git::Lib
- Defined in:
- lib/mumukit/sync/store/github/git_lib.rb
Instance Method Summary collapse
-
#remove(path = '.', opts = {}) ⇒ Object
Monkey patch to add –ignore-unmatch option.
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 |