Excepting pathological cases, every Git commit points to one commit (typical use) or two commits (when merging). Given the hash of a commit, how do I see what commit(s) it points to?
I'm looking for a formula. I know I can visually parse the output of
$ git log --graph --pretty=oneline --abbrev-commit
but I would prefer something scriptable, something that gives
f(hash in) -> hash(es) out
directly. The information is right there in the commit file, it shouldn't be so hard to pull out. I can't find anything from web searches, though, including Stack Overflow.