Add Option to Exclude Destination Branch Changes
Currently, the changes made are being determined by the command git diff <destination branch>..<source branch>. This command results in changes made in the destination branch as well.
Some CI tools have option to merge the source branch into the destination with the git clone step itself. In this case, changes made in the destination branch become irrelevant for determining the affected targets.
For these scenarios, we should use the git diff <destination branch>...<source branch> command to accurately determine the effective change set.
Proposal
Add one more command line option to exclude destination branch changes.
Hey, good point, let me check what can be done to achieve this.
Instead of passing the destination branch as the --base-branch argument try using git merge-base to find the best common ancestor between your source and destination branches. Using this commit at the --base-branch argument the tool will only consider the changes from the source branch back to that common ancestor.
example from my CI script:
MERGE_BASE=`git merge-base ${SOURCE_COMMIT} ${DESTINATION_BRANCH}`
echo "Merge Base: ${MERGE_BASE}"
mint run XcodeSelectiveTesting --base-branch ${MERGE_BASE}
@ashutosh-dhse with the new option -c it's possible to pass in the changed files as a list: https://github.com/mikeger/XcodeSelectiveTesting/pull/39 See https://github.com/mikeger/XcodeSelectiveTesting/issues/37