title: How to determine if a branch has no parent commits
body: <p>I am writing some tooling that needs to know whether the current branch location/commit has no parents. (This could come about most likely by being a fresh repository with no commits, or a deliberately orphaned branch.) I need a way to check command line output/exit codes so this can be done within a program and automated.</p>
  
  <p>Ideally, this could be accomplished only using git plumbing commands, but failing an easy way to do that, I can work with git porcelain commands.</p>
  
  <p>How can I reliably and succinctly determine if a git branch is an orphan or not?</p>