Financial-Times / nori

🍙 exploratory command-line tool to make changes across multiple repositories & track their progress
MIT License
11 stars 0 forks source link

Cannot clone repositories when not inside a git repository #147

Open ivomurrell opened 3 years ago

ivomurrell commented 3 years ago

Now that we can no longer assume the HEAD branch of the git remote we're cloning, we call git remote show to ascertain what the active branch is (usually main in our repositories.) However, bizarrely, the git command fails to run if we aren't running nori inside a directory with a .git directory, throwing an error of

fatal: not a git repository (or any of the parent directories): .git

Not sure what the best way around this is, perhaps by setting the CWD to the repository we've cloned when running the git show command (making sure to only get the HEAD branch after we've cloned,) so that we'd always be running it in a directory with a .git directory?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.