mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
fixes #53849
This commit is contained in:
@@ -795,10 +795,10 @@ export class Repository {
|
||||
return parseLsFiles(stdout);
|
||||
}
|
||||
|
||||
async getGitRelativePath(treeish: string, relativePath: string): Promise<string> {
|
||||
async getGitRelativePath(ref: string, relativePath: string): Promise<string> {
|
||||
const relativePathLowercase = relativePath.toLowerCase();
|
||||
const dirname = path.posix.dirname(relativePath) + '/';
|
||||
const elements: { file: string; }[] = treeish ? await this.lstree(treeish, dirname) : await this.lsfiles(dirname);
|
||||
const elements: { file: string; }[] = ref ? await this.lstree(ref, dirname) : await this.lsfiles(dirname);
|
||||
const element = elements.filter(file => file.file.toLowerCase() === relativePathLowercase)[0];
|
||||
|
||||
if (!element) {
|
||||
|
||||
Reference in New Issue
Block a user