Skip to content

targeting git repos with a nonstandard name/path? #26

Open
@abathur

Description

@abathur

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions