class Git::Base

Public Instance Methods

merge_base(commit1, commit2, *other_commits) click to toggle source

Use git-merge-base git-scm.com/docs/git-merge-base to find as good common ancestors as possible for a merge

# File lib/danger/scm_source/git_repo.rb, line 197
def merge_base(commit1, commit2, *other_commits)
  Open3.popen2("git", "merge-base", commit1, commit2, *other_commits) { |_stdin, stdout, _wait_thr| stdout.read.rstrip }
end