mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Git - handle missingcontext information for commands (#234161)
This commit is contained in:
@@ -1525,16 +1525,20 @@ export class CommandCenter {
|
||||
}
|
||||
|
||||
@command('git.diff.stageHunk')
|
||||
async diffStageHunk(changes: DiffEditorSelectionHunkToolbarContext): Promise<void> {
|
||||
async diffStageHunk(changes: DiffEditorSelectionHunkToolbarContext | undefined): Promise<void> {
|
||||
this.diffStageHunkOrSelection(changes);
|
||||
}
|
||||
|
||||
@command('git.diff.stageSelection')
|
||||
async diffStageSelection(changes: DiffEditorSelectionHunkToolbarContext): Promise<void> {
|
||||
async diffStageSelection(changes: DiffEditorSelectionHunkToolbarContext | undefined): Promise<void> {
|
||||
this.diffStageHunkOrSelection(changes);
|
||||
}
|
||||
|
||||
async diffStageHunkOrSelection(changes: DiffEditorSelectionHunkToolbarContext): Promise<void> {
|
||||
async diffStageHunkOrSelection(changes: DiffEditorSelectionHunkToolbarContext | undefined): Promise<void> {
|
||||
if (!changes) {
|
||||
return;
|
||||
}
|
||||
|
||||
let modifiedUri = changes.modifiedUri;
|
||||
if (!modifiedUri) {
|
||||
const textEditor = window.activeTextEditor;
|
||||
|
||||
Reference in New Issue
Block a user