Allow getCommit to be called without a revision.

In this case, it returns the most recent commit for any branch.