mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-17 17:25:51 -05:00
Changes previous diff to working diff if uncommit
This commit is contained in:
@@ -545,6 +545,17 @@ export default class GitProvider extends Disposable {
|
||||
return locations;
|
||||
}
|
||||
|
||||
async getStatusForFile(fileName: string, repoPath: string) {
|
||||
Logger.log(`getStatusForFile('${fileName}', ${repoPath})`);
|
||||
return (await Git.statusForFile(fileName, repoPath)).trim();
|
||||
}
|
||||
|
||||
async isFileUncommitted(fileName: string, repoPath: string) {
|
||||
Logger.log(`isFileUncommitted('${fileName}', ${repoPath})`);
|
||||
const status = await this.getStatusForFile(fileName, repoPath);
|
||||
return status && status.length;
|
||||
}
|
||||
|
||||
async getVersionedFile(fileName: string, repoPath: string, sha: string) {
|
||||
Logger.log(`getVersionedFile('${fileName}', ${repoPath}, ${sha})`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user