Skip to content
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

Git: Adopt FileSystem Provider #84130

Merged
merged 7 commits into from
Nov 19, 2019
Merged

Git: Adopt FileSystem Provider #84130

merged 7 commits into from
Nov 19, 2019

Conversation

joaomoreno
Copy link
Member

@joaomoreno joaomoreno commented Nov 7, 2019

Fixes #55110

Issues:

  • Diff editor doesn't seem to listen on changes for the left document
  • Opening the HEAD version of a file does call watch but doesn't seem to react on file events

@joaomoreno joaomoreno added this to the November 2019 milestone Nov 7, 2019
@joaomoreno joaomoreno added the git GIT issues label Nov 7, 2019
@bpasero
Copy link
Member

bpasero commented Nov 8, 2019

@joaomoreno

Diff editor doesn't seem to listen on changes for the left document

I cannot reproduce that when I try with this example:

  • compare 2 files from file explorer
  • open left hand file in new window
  • make changes

=> left hand side updates

Opening the HEAD version of a file does call watch but doesn't seem to react on file events

Can you add a breakpoint to handleUpdatesToTextModels and follow that trace to see if the model gets an update?

Opening the Changes and HEAD of a file then closing HEAD will close both editors

This is possibly #51039 and not specific to custom file providers but also reproduces with normal.

The HEAD version of a file should persist on reload. The tab appears for a while but it goes away pretty soon after reload

There is an error: ENOPRO: No file system provider found for gitfs:/Users/bpasero/Desktop/test-ts/. Checking the activation of git, I see it kicks in only later after the editors are restored.

@jrieken might know more about activation and us not waiting for activation maybe when restoring editors?

The tab of the HEAD version of a file looks the same as the file itself, we need to find a way to distinguish them.

Yes, you should be able to do that by registering a label formatter for the gitfs scheme. Check out vscode.workspace.registerResourceLabelFormatter (proposed API).

@joaomoreno
Copy link
Member Author

joaomoreno commented Nov 14, 2019

The HEAD version of a file should persist on reload. The tab appears for a while but it goes away pretty soon after reload.

Solution: Git should wait for the first status call to complete, before returning a stat/read.

@bpasero
Copy link
Member

bpasero commented Nov 15, 2019

@joaomoreno I landed a change on master that diff editors no longer close when closing any of the 2 editors inside. I hope this works fine, we gotta check for regressions.

@joaomoreno joaomoreno added feature-request Request for new features or functionality and removed feature-request Request for new features or functionality labels Nov 19, 2019
@joaomoreno joaomoreno merged commit b7ead23 into master Nov 19, 2019
@joaomoreno joaomoreno deleted the joao/git-fs-provider branch November 19, 2019 15:56
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt FileSystemProvider for Git
2 participants