-
Notifications
You must be signed in to change notification settings - Fork 568
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
Support for local VCS allowing to index local path #156
base: main
Are you sure you want to change the base?
Support for local VCS allowing to index local path #156
Conversation
This looks good to me, thanks. I'll let @kellegous take a look and merge when ready. |
@gemignani Sorry, I have been really behind on pull requests. I'll take a closer look at this soon. I'll leave some minor comments now. I think the one thing that is missing in the local support is that local vcs really shouldn't poll by default because it introduces the possibility that the repo will be indexed while it is being mutated. However, that's a thing I can easily help out with. |
searcher/searcher.go
Outdated
@@ -367,6 +365,13 @@ func newSearcher( | |||
SpecialFiles: wd.SpecialFiles(), | |||
} | |||
|
|||
var vcsDir string | |||
if (wd.IsLocal()) { |
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.
I think this would better separate concerns if the vcs interface had a function kind of like this:
WorkDirFrom(dbpath string, repo *config.Repo) string
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.
like in in vcs.Driver?
Then each driver (apart from local) will need to implement basically the same code to get the working dir.
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.
Right. I'm saying that Driver should not have IsLocal
. Rather than having the Searcher
have special knowledge of what IsLocal
means, it would be better to just move the path creation into the driver. That does mean that this new method will have identical implementations for all the existing drivers, but that's also the case with IsLocal
.
0710891
to
171902c
Compare
…ing a part of the version-controller repository.
171902c
to
c68f0f1
Compare
…rily being a part of the version-controller repository.
Any plans to finish this support? |
@snagytx, I'd love to, but very short time recently. :( |
Support for local VCS allowing to index local path not necessarily being a part of the version-controller repository.
Non-copying version of #138.