test: don't rely on root being a git repo
Created by: stefanhengl
The test TestInferRepo
unnecesarily depends on the root being a git
repository. This change updates TestInferRepo
to create a fresh git
repo in a temporary dir.
Why?
I want to add src-cli to the nixos package repository. During the build
stage, nixos downloads a tar of the repo. The tar, however, is not a git
repo and thus TestInferRepo
fails.