Git - handle the diff editor for untracked files now that we throw `FileNotFound` if the file does not exist (#236863)
parent
fca210cd10
commit
4fa5611d67
|
@ -192,7 +192,8 @@ export class GitFileSystemProvider implements FileSystemProvider {
|
|||
try {
|
||||
return await repository.buffer(sanitizeRef(ref, path, repository), path);
|
||||
} catch (err) {
|
||||
// File does not exist in git (ex: git ignored)
|
||||
// File does not exist in git. This could be
|
||||
// because the file is untracked or ignored
|
||||
throw FileSystemError.FileNotFound();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -560,13 +560,11 @@ class ResourceCommandResolver {
|
|||
switch (resource.type) {
|
||||
case Status.INDEX_MODIFIED:
|
||||
case Status.INDEX_RENAMED:
|
||||
case Status.INDEX_ADDED:
|
||||
case Status.INTENT_TO_RENAME:
|
||||
case Status.TYPE_CHANGED:
|
||||
return { original: toGitUri(resource.original, 'HEAD') };
|
||||
|
||||
case Status.MODIFIED:
|
||||
case Status.UNTRACKED:
|
||||
return { original: toGitUri(resource.resourceUri, '~') };
|
||||
|
||||
case Status.DELETED_BY_US:
|
||||
|
|
Loading…
Reference in New Issue