Add option to limit number of commits to list with getCommits