Class: Git::Base
- Inherits:
-
Object
- Object
- Git::Base
- Defined in:
- lib/danger/scm_source/git_repo.rb
Instance Method Summary collapse
-
#merge_base(commit1, commit2, *other_commits) ⇒ Object
Use git-merge-base git-scm.com/docs/git-merge-base to find as good common ancestors as possible for a merge.
Instance Method Details
#merge_base(commit1, commit2, *other_commits) ⇒ Object
Use git-merge-base git-scm.com/docs/git-merge-base to find as good common ancestors as possible for a merge
197 198 199 |
# 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 |