Git alias:
commit-parents = !"f(){ \ git cat-file -p \"${*:-HEAD}\" | \ sed -n '/0/,/^ *$/{/^parent /p}'; \ };f"
Example:
git commit-parents