mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-12 19:18:32 -05:00
Adds stash commands similar to SCM
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
import { ExtensionContext, TreeItem, TreeItemCollapsibleState, Uri } from 'vscode';
|
||||
import { Command, ExtensionContext, TreeItem, TreeItemCollapsibleState, Uri } from 'vscode';
|
||||
import { Commands, DiffWithPreviousCommandArgs } from '../commands';
|
||||
import { ExplorerNode, ResourceType } from './explorerNode';
|
||||
import { getGitStatusIcon, GitCommit, GitService, GitUri, IGitStatusFile, StatusFileFormatter } from '../gitService';
|
||||
@@ -34,7 +34,13 @@ export class CommitFileNode extends ExplorerNode {
|
||||
light: this.context.asAbsolutePath(path.join('images', 'light', icon))
|
||||
};
|
||||
|
||||
item.command = {
|
||||
item.command = this.getCommand();
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
getCommand(): Command | undefined {
|
||||
return {
|
||||
title: 'Compare File with Previous',
|
||||
command: Commands.DiffWithPrevious,
|
||||
arguments: [
|
||||
@@ -49,7 +55,5 @@ export class CommitFileNode extends ExplorerNode {
|
||||
} as DiffWithPreviousCommandArgs
|
||||
]
|
||||
};
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user