-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Adopt FileSystemProvider for Git #55110
Comments
I see. We have the notion of the rename path in our Git model, but not in the URI. How else could a Git extension API help you, instead of having additional fields on git uris? |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Doh -- got closed. I guess fixing the open file command, to detect the case where the file on disk doesn't exist and walk back from that commit to the working file -- which is what I do in GitLens in this case (and then store that working filename in the Uri) |
@eamodio Let's push for this. Would exposing this |
I think that will help some, but I've recently abandoned the usage of a 2 other things that I think would help would be to somehow provide the Uri (or something) to the |
This is probably something that should also be done by git itself. Would possibly fix these issues: #36219, #48038, #48038 Maybe we can join forces, bring that over to the git extension and you could leverage it?
Hm... not sure I understand this one.
Just talked to @bpasero about this yesterday. Guess what? 4e3f58f#diff-81002b6983f6ca938fb1efc58cd9da2f |
Yeah, I was talking to @rebornix a bit about that the other day. As it should remove a bunch of the complexities that the git extension currently has to deal with images, encoding, etc. I am definitely open to join forces to get this into the git extension itself. I'm also planning on implementing a search provider (as soon as that API is stable) so that you can search a git repo at a specific revision -- is that something else that could go in core?
I mean that if I open a diff of Re: label Yey! Although this is only helpful when you are explicitly opening a Uri. But in the case of you opening a folder with a |
It is definitely interesting!
I see... The current git extension doesn't really worry itself with anything other than Let's leave this issue open for the FileSystemProvider adoption. |
workingPath
to GitUriParams
Might isomorphic-git be a path to getting VSCode's built-in git support to a place where it can play nice with |
@wmhilton FYI the above suggestion. You can probably speak to this. :-) |
@eamodio The git extension now uses the file system provider and a barebones utility has appeared in its API: https://github.com/microsoft/vscode/blob/master/extensions/git/src/api/git.d.ts#L189 Needs more work in there, depending on on the requirements from extensions, but it's a starting step. |
@joaomoreno Will we be supporting the directory traversal with the fs provider? That would enable breadcrumbs and workspace folder support. |
@eamodio You mean creating a fs view in which only the modified files would exist? It's a cool idea, but it would require me to go away from encoding extra information in the uri query params and rely solely on path. There were a few issues wrt using path only, very early on, but those might've been ironed over the years. Maybe it's worthwhile looking into once again. Something like:
|
I'm trying to fix gitkraken/vscode-gitlens#430 and I think my best option it to stop creating temp files and instead leverage the built-in git content provider (
git:
scheme). I have this solution pretty much working (though will require a bunch of burn in), but the biggest issue I'm having is when I'm showing a diff of a file that has been renamed or moved the open file command will fail because the path of the file doesn't match the working tree.To fix this can we add an optional
workingPath
toGitUriParams
and use it if it exists when executing the open file command?The other challenge is that using the git content provider doesn't handle images, but I can probably just replicate the logic here:
https://github.com/Microsoft/vscode/blob/master/extensions/git/src/commands.ts#L255-L272
/cc @joaomoreno
The text was updated successfully, but these errors were encountered: