As far as I know, commit object contains information only about parents, so if I have situation something like this:
* branch-1 | o | o master | o
Git doesn't really have a concept of this, if you want to add this, you'd need to add a heuristic, because all git really cares about is attaching a label to a given commit in the tree.