mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 06:21:50 +01:00
Git - Improve unsafe repository handling (#168568)
Improve unsafe repository handling by extracting the repository path to be used when calling git config
This commit is contained in:
@@ -686,9 +686,6 @@ export class Git {
|
||||
}
|
||||
|
||||
async addSafeDirectory(repositoryPath: string): Promise<void> {
|
||||
// safe.directory only supports paths with `/` as separator
|
||||
repositoryPath = repositoryPath.replaceAll('\\', '/');
|
||||
|
||||
await this.exec(repositoryPath, ['config', '--global', '--add', 'safe.directory', repositoryPath]);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user