-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
targeting git repos with a nonstandard name/path? #26
Comments
Another (more flexible, but maybe overkill?) option would just be, whether through accepting paths last with a flag to change the meaning, or a git-style |
If I understand you correctly, you mean support for work trees that are different than the location of the
I suspect that this is what yadm does under the hood, much like other dotfile managers. Multi-git-status needs to know both the working dir and the
This is already what mgitstatus does at the moment. See line 128. But mgitstatus needs both the I currently don't see a very user-friendly way on the commandline for the user to provide a mapping between where the
That's a bit of a departure from the way mgitstatus works now. I'm not sure it's worth it to support such a (I assume) fringe use-case. |
Good point. I agree that it's probably an edge-case that doesn't justify significantly complicating anything. I'll try to find some time to think on/poke at the source. |
Had a little time to pick at implementing this directly in command syntax. The basic functionality is pretty simple, but finding logical/syntactical space for it is a little trickier... Here are the main ways I've thought about it:
Curious how these strike you. |
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 thefind
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).The text was updated successfully, but these errors were encountered: