mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Revert "Git - escape shell-sensitive characters (#236849)"
This reverts commit fca210cd10.
This commit is contained in:
@@ -349,15 +349,10 @@ function getGitErrorCode(stderr: string): string | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/89373
|
||||
// https://github.com/git-for-windows/git/issues/2478
|
||||
function sanitizePath(path: string): string {
|
||||
return path
|
||||
// Drive letter
|
||||
// https://github.com/microsoft/vscode/issues/89373
|
||||
// https://github.com/git-for-windows/git/issues/2478
|
||||
.replace(/^([a-z]):\\/i, (_, letter) => `${letter.toUpperCase()}:\\`)
|
||||
// Shell-sensitive characters
|
||||
// https://github.com/microsoft/vscode/issues/133566
|
||||
.replace(/(["'\\\$!><#()\[\]*&^| ;{}?`])/g, '\\$1');
|
||||
return path.replace(/^([a-z]):\\/i, (_, letter) => `${letter.toUpperCase()}:\\`);
|
||||
}
|
||||
|
||||
const COMMIT_FORMAT = '%H%n%aN%n%aE%n%at%n%ct%n%P%n%D%n%B';
|
||||
|
||||
Reference in New Issue
Block a user