Skip to content

Fix git diff detection code #13851

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

Merged
merged 1 commit into from
Sep 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export class NativeEditorProviderOld extends NativeEditorProvider {
(editorUri) =>
editorUri.document &&
editorUri.document.uri.scheme === 'git' &&
this.fs.arePathsSame(editorUri.document.uri, editor.document.uri)
editorUri.document.uri.fsPath === editor.document.uri.fsPath

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
editorUri.document.uri.fsPath === editor.document.uri.fsPath
editorUri.document.uri.fsPath === editor.document.uri.fsPath

Adding a comment would be useful & probably adding a test to ensure this works with different resource schemes (I'm assuming that's the case here).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I.e. we need to ensure we do not regress again, comment + test would be useful.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry, merged this before this comment showed up! I'll put up a new PR @DonJayamanne

);

if (!gitSchemeEditor) {
Expand Down