class Git::Lib

Public Instance Methods

remote_add(name, url, opts = {}) click to toggle source
# File lib/octolab.rb, line 28
def remote_add(name, url, opts = {})
  arr_opts = ['add']
  arr_opts << '-f' if opts[:with_fetch] || opts[:fetch]
  arr_opts << '-t' << opts[:track] if opts[:track]
  arr_opts << '--mirror=fetch'if opts[:mirror]
  arr_opts << '--'
  arr_opts << name
  arr_opts << url

  command('remote', arr_opts)
end