Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Add merge base command #1096

Merged
merged 2 commits into from
Jun 14, 2019
Merged

Conversation

dpordomingo
Copy link
Contributor

@dpordomingo dpordomingo commented Mar 25, 2019

Uses the code from #1097 to implement a command, mimicking git merge-base.

Help with a full description of the implemented functionalities is shown running merge_base --help.

usage:

$ ./merge_base

Returns the merge-base between two commits:

usage: merge_base <path> <commitRev> <commitRev>
   or: merge_base <path> --independent <commitRev>...
   or: merge_base <path> --is-ancestor <commitRev> <commitRev>
   or: merge_base --help

    (no option)       lists the best common ancestors of the two passed commits
    --independent     list commits not reachable from the others
    --is-ancestor     is the first one ancestor of the other?
    --help            show the full help message of merge_base

@dpordomingo
Copy link
Contributor Author

Travis is failing https://travis-ci.org/src-d/go-git/jobs/511121578#L668 because the new test cases depend on new fixtures, to be merged by src-d/go-git-fixtures#13

Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
@dpordomingo
Copy link
Contributor Author

dpordomingo commented Jun 3, 2019

@mcuadros the _example command is again ready after #1097 was merged.
It also includes the "integration tests" for the merge_base feature.

@yelirekim
Copy link
Contributor

👋

Is this PR ready for merge?

It would be really great if we could get the ability to find merge bases put out in a release at some point. We have several applications that would benefit from it downstream.

@mcuadros mcuadros merged commit 26b54e8 into src-d:master Jun 14, 2019
@yelirekim
Copy link
Contributor

🎉

1 similar comment
@zhaopengme
Copy link

🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants