+9
Completed

Add option to find common ancestor (aka merge base) for selected commits

Mikhail Matrosov 7 years ago updated by Marc Strapetz 3 years ago 3

Investigating history of commits with many merges can be a real pain. One useful feature is to be able to locate merge base. Not only for merge commits (though it would be useful on its own), but also for arbitrary pair of commits.

+1

We've written an accelerator for this task, which uses uses `git rev-parse` on the selected Hash and compares this with the reference branch. Indeed, you have to specifiy a branch name for this since rev-parse need so know the history of this.

If you pipe the two outputs to diff, you will find the original forking point.

+1

This can be done by adding a Tool (Preferences, Tools) like:

${git} merge-base ${commit} ${commit2}

with Show output and wait until finished option selected. Then in the Log Graph or in the Branches view,  you can select two commits and invoke this tool from the context menu and check results in Window|Output.

Completed

SmartGit 22.1 will show the merge base in the Commit view.