Skip to content
This repository was 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

@dpordomingo dpordomingo force-pushed the merge-base-command branch 2 times, most recently from c772cac to ab69f58 Compare March 29, 2019 16:17
@dpordomingo dpordomingo force-pushed the merge-base-command branch 4 times, most recently from b66a7ff to 3936207 Compare April 8, 2019 19:11
@dpordomingo dpordomingo force-pushed the merge-base-command branch from 3936207 to 8fd00c3 Compare June 3, 2019 18:43
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
@dpordomingo dpordomingo force-pushed the merge-base-command branch from 8fd00c3 to 56af959 Compare June 3, 2019 18:59
@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

🎉

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

Successfully merging this pull request may close these issues.

4 participants