Git - add extension API to get the repository root (#250044)

* Git - add extension API to get the repository root

* Pull request feedback
This commit is contained in:
Ladislau Szomoru
2025-05-30 20:13:55 +02:00
committed by GitHub
parent 2b6a59a681
commit 6e189da432
3 changed files with 26 additions and 1 deletions

View File

@@ -342,6 +342,8 @@ function getGitErrorCode(stderr: string): string | undefined {
return GitErrorCodes.InvalidBranchName;
} else if (/Please,? commit your changes or stash them/.test(stderr)) {
return GitErrorCodes.DirtyWorkTree;
} else if (/detected dubious ownership in repository at/.test(stderr)) {
return GitErrorCodes.NotASafeGitRepository;
}
return undefined;