mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-12 19:18:32 -05:00
Reworks git command error handling
Switches to use the new diffWith command
This commit is contained in:
@@ -40,16 +40,6 @@ export class CommitFileNode extends ExplorerNode {
|
||||
}
|
||||
|
||||
getCommand(): Command | undefined {
|
||||
let allowMissingPrevious = false;
|
||||
let prefix = undefined;
|
||||
if (this.status.status === 'A') {
|
||||
allowMissingPrevious = true;
|
||||
prefix = 'added in ';
|
||||
}
|
||||
else if (this.status.status === 'D') {
|
||||
prefix = 'deleted in ';
|
||||
}
|
||||
|
||||
return {
|
||||
title: 'Compare File with Previous Revision',
|
||||
command: Commands.DiffWithPrevious,
|
||||
@@ -61,9 +51,7 @@ export class CommitFileNode extends ExplorerNode {
|
||||
showOptions: {
|
||||
preserveFocus: true,
|
||||
preview: true
|
||||
},
|
||||
allowMissingPrevious: allowMissingPrevious,
|
||||
rightTitlePrefix: prefix
|
||||
}
|
||||
} as DiffWithPreviousCommandArgs
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user