insights: fix empty repo checks
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: chwarwick
Consolidates logic for getting first git commit and making it easier to deal with empty repos.
related to https://github.com/sourcegraph/sourcegraph/issues/35450
unit tests pass Manually verified insight creation with & without empty repos
Push commits to the source branch or add previously merged commits to review them.