test: bot_git: DRYing up some git dir population logic
bot_git GitDir learned getCommits

Commit learned how to parse `git rev-list`

Added (usually null) commitSha
GitDir: tiny code reorg
bot_git: GitDir learned showRef