I am writing a script that requires checking whether a particular commit is a Merge/Revert commit or not, and I am wondering if there is a git trick for that.
What I came up with so far (and I definitely don't want to depend on the commit message here) is to check HASH^2 and see if I don't get an error, is there a better way?