Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @vitsalis, congrats for the tool! I thought that it could be useful to analyse remote repos. I made some changes to the tool, let me know what you think, thanks.
This PR proposes to change the input params to let run RepoFS on remote and local repositories. The tool requires an URI which targets the repo to process, two optional params can be used to define the local paths of the cloned repo and file system.
The new params are:
Examples of RepoFS calls from cmd are:
When the tool is executed, the target repo is cloned only if it doesn't exist, otherwise pygit2 is used to pull all branches. The corresponding code added in the main() relies on https://github.com/MichaelBoselowitz/pygit2-examples/blob/master/examples.py#L54 (I didn't test it extensively).
The logic included in main has been moved to /bin/repofs for refactor purposes. IMHO, it's better to have the logic in charge of parsing and executing the tool in a separated folder.
The requirements.txt is included to test the tool as follows:
README.md has been updated accordingly.