mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 18:12:45 -05:00
Git - revert some changes that are not needed (#248215)
This commit is contained in:
@@ -2010,12 +2010,12 @@ export class CommandCenter {
|
||||
|
||||
this.logger.trace(`[CommandCenter][unstageSelectedRanges] selectedDiffs: ${JSON.stringify(selectedDiffs)}`);
|
||||
|
||||
if (modifiedUri.scheme === 'file') {
|
||||
// Editor
|
||||
this.logger.trace(`[CommandCenter][unstageSelectedRanges] changes: ${JSON.stringify(selectedDiffs)}`);
|
||||
await this._unstageChanges(textEditor, selectedDiffs);
|
||||
return;
|
||||
}
|
||||
// if (modifiedUri.scheme === 'file') {
|
||||
// // Editor
|
||||
// this.logger.trace(`[CommandCenter][unstageSelectedRanges] changes: ${JSON.stringify(selectedDiffs)}`);
|
||||
// await this._unstageChanges(textEditor, selectedDiffs);
|
||||
// return;
|
||||
// }
|
||||
|
||||
const selectedDiffsInverted = selectedDiffs.map(invertLineChange);
|
||||
this.logger.trace(`[CommandCenter][unstageSelectedRanges] selectedDiffsInverted: ${JSON.stringify(selectedDiffsInverted)}`);
|
||||
|
||||
@@ -208,9 +208,10 @@ export function compareLineChanges(a: LineChange, b: LineChange): number {
|
||||
}
|
||||
|
||||
export function getIndexDiffInformation(textEditor: TextEditor): TextEditorDiffInformation | undefined {
|
||||
// Diff Editor (Index) | Text Editor
|
||||
// Diff Editor (Index)
|
||||
return textEditor.diffInformation?.find(diff =>
|
||||
diff.original && isGitUri(diff.original) && fromGitUri(diff.original).ref === 'HEAD');
|
||||
diff.original && isGitUri(diff.original) && fromGitUri(diff.original).ref === 'HEAD' &&
|
||||
diff.modified && isGitUri(diff.modified) && fromGitUri(diff.modified).ref === '');
|
||||
}
|
||||
|
||||
export function getWorkingTreeDiffInformation(textEditor: TextEditor): TextEditorDiffInformation | undefined {
|
||||
|
||||
Reference in New Issue
Block a user