Description
It would be nice to be able to point mgitstatus at nonstandard git repos.
My personal use-case is the yadm dotfile manager https://github.com/TheLocehiliosan/yadm, which is uses a distinct path. Typically we'd just interact with that repo via yadm <git-sub-command>...
, but we can also do something like GIT_DIR=~/.yadm/git.repo git status to run plain git commands against it.
I'm not sure what's best in terms of syntax/implementation (I can imagine a few different ways...) but a fairly simple idea is a flag to specify one -name
to the find
command. For example, I can use something like this to match all of the git repositories mgitstatus finds, plus the yadm repo I mentioned: find -L . -maxdepth 3 -type d -name "*.git"
(I had to adjust the maxdepth up 1, though, since that's matching deeper in the tree).