I'm writing a tool for my team to help auto-forward commits to "future" branches, and one of the things I would like to detect is whether a merge was done via '-s ours'. I plan to treat these kinds of forwards different from other merges, since they represent a choice not to forward a commit.
Is there any programmatic way to detect this?
The best thing I can think of is to check if
git diff REF^1 REF
is empty.