-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: Diff source autodetection and caching #9951
base: master
Are you sure you want to change the base?
feat: Diff source autodetection and caching #9951
Conversation
4a9baf9
to
de43777
Compare
2f9deec
to
475b847
Compare
6c08b04
to
fc7c8c3
Compare
if I see this right this does "autodetection" per document and turns diff provider into a per-document thing right? I want this to be a config option in the future that can be set for the document with All this is part of the config refactor I am working on. I also want to add an If no explicit value is provided autodetection would be used. This would be particularly relevant to this PR because I don't want the I was only thinking of VCS with the autodection. I thought that there would usually only be one vcs per workspace (we use |
That's a lot of ideas in one comment :) !
Sure I can do that easily, I don't have a strong opinion and copied the previous MR (1)
I thought about that but for now I find it useless since the git repo is not kept open between diff calls. Ideally we would do it yes but I'm unsure it should be done in this MR just yet There are also issues with updating this from external events and even just removing the git dir for example, but I think the proper solution will be to tell people to reload the diffs
that can be done in another MR without issues I feel I'll do (1) today, for the rest, especially keeping track of workspaces will need more work |
fc7c8c3
to
ef87854
Compare
I originally was thinking in the direction of just having a global config option that would be controlled by autodetection by default. I was hoping to go that direction since I wanted to avoid adding
Yeah I think this should only update if people reload. Maybe something fancier once we have a filewatcher But that is still in the more distant future. |
9aeead5
to
de1c13b
Compare
I changed the approach completely:
|
I'll add the "File" diff source and the "diffsource" command in a PR on top when this one is merged since it's an orthogonal issue and would make reviewing this harder |
9a2adf6
to
06c861b
Compare
ece35b6
to
af70135
Compare
b6c8095
to
933f8fe
Compare
c5b7c81
to
0d4c665
Compare
43c9c5f
to
a8515c3
Compare
a8515c3
to
246ad3b
Compare
246ad3b
to
4648abf
Compare
4648abf
to
4554e0e
Compare
38b9700
to
68b7b1e
Compare
a63236d
to
6892770
Compare
f10169c
to
f34ba78
Compare
f34ba78
to
ec7b62e
Compare
52c4a28
to
d4f31f6
Compare
d4f31f6
to
fd604c2
Compare
Following discussions in both #9892 and #8056, this PR adds diff source autodetection and caching.
Supported diff sources
Work left for another PR because it would clutter this one (it's possible not all of this will be implemented, those are ideas):
I did not find any issue about diff source autodetection, if there is one I missed tell me or edit the PR desc to mark it as closing the issue if relevant :)