class BetweenMeals::Repo::Git::Cmd

Public Instance Methods

clone(url, repo_path) click to toggle source
# File lib/between_meals/repo/git/cmd.rb, line 31
def clone(url, repo_path)
  cmd("clone #{url} #{repo_path}", '/tmp')
end
config(key) click to toggle source
# File lib/between_meals/repo/git/cmd.rb, line 23
def config(key)
  s = cmd("config #{key}", nil, true)
  unless [0, 1].include?(s.exitstatus)
    s.error!
  end
  s
end
diff(start_ref, end_ref) click to toggle source
# File lib/between_meals/repo/git/cmd.rb, line 35
def diff(start_ref, end_ref)
  cmd("diff --name-status #{start_ref} #{end_ref}")
end
merge_base(rev, master) click to toggle source
# File lib/between_meals/repo/git/cmd.rb, line 43
def merge_base(rev, master)
  cmd("merge-base #{rev} #{master}")
end
pull() click to toggle source
# File lib/between_meals/repo/git/cmd.rb, line 39
def pull
  cmd('pull --rebase')
end
status() click to toggle source
# File lib/between_meals/repo/git/cmd.rb, line 47
def status
  cmd('status --porcelain 2>&1')
end