We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef78677 commit 436ef26Copy full SHA for 436ef26
src/model.ts
@@ -250,16 +250,9 @@ export class GitExtension implements IGitExtension {
250
* @param path the file path relative to the server root
251
*/
252
getFile(path: string): Git.IStatusFile {
253
- const matchingFiles = this._status.files.find(status => {
+ return this._status.files.find(status => {
254
return this.getRelativeFilePath(status.to) === path;
255
});
256
- if (matchingFiles.length === 0) {
257
- return;
258
- }
259
- if (matchingFiles.length > 1) {
260
- console.warn('More than one file matching given path', path);
261
262
- return matchingFiles[0];
263
}
264
265
/**
0 commit comments