-
Notifications
You must be signed in to change notification settings - Fork 573
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
Allow quick & shallow copies of Git repos to select which repos to index #1115
Allow quick & shallow copies of Git repos to select which repos to index #1115
Conversation
I tried it with your example query and also with the reverse one (exclude_file and exclude_regex) and as far as I can see it doesn't index anything by default and only files in 'include_regex' and 'include_file' were indexed. In the case of exclude_file and exclude_regex nothing was indexed at all. Can we change that so that everything is included by default and the user will use 'exclude_' fields to ignore some files and folders? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code changes look good to me, will give this a test.
70d7895
to
e2445b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well and code LGTM.
Before merging can you make sure that the commits.rs
flow only runs after we've done a deep clone of the repo. As is it panics during the shallow clone step.
We don't need the other criterion, as the callee function will hit the db to determine if there's work to be done.
Initiate the clone with:
This will create a shallow clone (1 commit depth), and a fast index of the repository in question, without looking at the body of any of the files.
After this process is done, the repository ends up in a
Shallow
state, which means it won't automatically be refreshed until the file filters are configured.To configure file filters, use the following call:
The first call to this will automatically create a Git clone of 1000 commits in depth, and allows syncing the repo fully with the configured file filters.
Note that file filters are additive, and prioritise inclusion over exclusion. In other words, once something's been added to the index, can't be marked to be removed from the index without removing the repository completely!