Added a try-catch block to avoid an IndexOutOfRangeException when viewing a repo with one commit.