Skip to content
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

allows nested repository discovery #53

Closed
wants to merge 1 commit into from
Closed

Conversation

pythys
Copy link

@pythys pythys commented Jan 23, 2023

A simple fix related to #49 by removing the if/else branch, thus allowing the tool to continue walking the directory tree, find any additional git repositories and register them.

I am working on additional logic to read the contents of .gitmodules if it exists, and then ignore the repositories defined over there since their discovery is the responsibility of git itself, not grm

@hakoerber
Copy link
Owner

Hey, thank you for your contribution!

I tried it, but unfortunately, recursing unconditionally led to a few problems:

  • It will also recurse into gitignored files. As an example, I have a per-project cargo registry cache which is gitignored, but that grm picked up because it's simply a git repository.
  • The runtime against my repository tree went from 300ms, to almost 3 seconds, so a tenfold increase. It's no longer instantaneous. This gap will get worse which a bigger repository tree. I guess this will improve with handling of submodules and gitignored files.

So I think this is fine as a first iteration, but not yet ready to be merged. Let me know when you make progress or if you need support!

@pythys
Copy link
Author

pythys commented Jan 26, 2023

I will close this and issue another PR later, substantial code needs to go in to handle .gitignore, .gitmodules and so on and so forth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants