We are interested of making a script that simplify our building process.
For that, we need to list the Git features that were merged onto one or more develop branches, since our last build.
I made this quick example, sorry for lack of design.
Let's imagine we are currently onto the build2 merge commit.
We want to know (from script) which features were delivered and are then concerned by this build.
Those features are D7 and D6, as they were merged on their respectives develop branches.
The difficulty there is probably to ignore the previous commits (D4, D3 and such) that was already present in our previous build and the fact that there is two develop branches which merge successively.
I know we can get get merges commits that exists on one branch and not another.
Using something like:
git log --oneline --merges --abbrev-commit origin/develop/$BRANCH...origin/release/$BRANCH
But this gets more complicated when using multiple develop or projects branches. And will probably returns false positives.
(there may be conflicts resolution commits that will change behavior)
Is there a better idea to do something like that ?