Skip to content

Git: Adopt FileSystem Provider - #84130

Merged
João Moreno (joaomoreno) merged 7 commits into
masterfrom
joao/git-fs-provider
Nov 19, 2019
Merged

João Moreno (joaomoreno) merged 7 commits into
masterfrom
joao/git-fs-provider

Conversation

@joaomoreno

@joaomoreno João Moreno (joaomoreno) commented Nov 7, 2019 •

Copy link
Copy Markdown
Contributor

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

@bpasero

Copy link
Copy Markdown
Contributor

João Moreno (@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.

Johannes Rieken (@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

João Moreno (joaomoreno) commented Nov 14, 2019 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

João Moreno (@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 João Moreno (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
João Moreno (joaomoreno) merged commit b7ead23 into master Nov 19, 2019
@joaomoreno
João Moreno (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