The merge case is more annoying than the latter, but my initial start at trying to fix this in webkitscmpy ran into its extensive mocking of git and I didn't have the energy to figure it out. Throwing the patch up here so it's at least somewhere that isn't my local drive. (Sidenote: would be good for the mock to throw or otherwise error if it gets arguments it isn't expecting.)
Created attachment 427258 [details] Patch
Created attachment 427260 [details] Patch
This is a fun one that I've encountered too, and we should fix it. I originally implemented this with deliberately strict regexes, and breaking not supporting merge-commits was also a deliberate choice, but maybe not the correct choice given the way folks do local development.
<rdar://problem/77555267>