sourcerer-io / sourcerer-app

🦄 Sourcerer app makes a visual profile from your GitHub and git repositories.
https://sourcerer.io/start
MIT License
6.73k stars 281 forks source link

feat: support searching recursively in a directory (#255) #536

Closed sfat closed 4 years ago

sfat commented 4 years ago

I only search with depth 2 as if you go recursively with unlimited depth, I saw that I have a particular git repo that was downloading and it would bring a whole git repo in a "cache" directory, which doesn't make sense.

Let me know if you think this is an isolated case and I can remove the depth limit.

For the interaction cli I also added a couple of questions before running the whole process, first ask the user if he wants to recursively search the specified directories and if he wants to skip the part if he wants hashAllCommitsForAllContributors as going in a directory with a lot of git repos, it's pretty annoying to have to be asked for each found directory if he wants to hash commits for all contributors, hence simplifying the process.

Obviously the 2 new options are turned off by default as to not confuse existing users since it's technically a breaking change.

Let me know if we want to turn on one of these options by default.

sfat commented 4 years ago

@yaronskaya , I saw that there is also another issue about autocomplete (https://github.com/sourcerer-io/sourcerer-app/issues/138). This ticket was about a request to search recursively. Not sure how the autocomplete is related to this. Don’t get me wrong, I am all in favor with the autocomplete, but I wanted to do them separately. What do you think?

yaronskaya commented 4 years ago

@sfat I think #138 is the same issue. Anyway, searching with depth 2 doesn't look valuable in terms of user experience.

sfat commented 4 years ago

@yaronskaya I've removed the limit of depth=2

yaronskaya commented 4 years ago

@sfat I meant adding all repositories may go against user expectations since unwanted repositories might be written to sourcerer. Essentially we can only complete defined folder name. Do you think of implementing listening TAB pressing?

sfat commented 4 years ago

@yaronskaya , I mean, listening tab pressing is nice and all, but then why was #255 open for recursively searching in a directory?

If this was not desired then I would just close this PR, close #255 as it is not something that is desired to have as a functionality and I'll do another PR for the tab thing.

I personally find it useful to search recursively in a repo. Also, the functionality is only enabled if you explicitly want to.

Yet again, it's not my call into these decisions, so whatever you decide, I'm fine as well.

P.S.: I'm probably the one to blame as I didn't ask in the ticket if this is something that I could've start working on instead of implementing it without asking first 🙃