mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 18:48:45 -05:00
Removes stash list in explorer command
Rename Show File History in Explorer back to Open File History Explorer Removes the git explorer view (for now)
This commit is contained in:
15
package.json
15
package.json
@@ -854,7 +854,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.showFileHistory",
|
"command": "gitlens.showFileHistory",
|
||||||
"title": "Show File History in Explorer",
|
"title": "Open File History Explorer",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -897,11 +897,6 @@
|
|||||||
"title": "Show Stashed Changes",
|
"title": "Show Stashed Changes",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"command": "gitlens.showStashList",
|
|
||||||
"title": "Show Stashed Changes in Explorer",
|
|
||||||
"category": "GitLens"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"command": "gitlens.copyShaToClipboard",
|
"command": "gitlens.copyShaToClipboard",
|
||||||
"title": "Copy Commit ID to Clipboard",
|
"title": "Copy Commit ID to Clipboard",
|
||||||
@@ -1081,10 +1076,6 @@
|
|||||||
"command": "gitlens.showQuickStashList",
|
"command": "gitlens.showQuickStashList",
|
||||||
"when": "gitlens:enabled"
|
"when": "gitlens:enabled"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"command": "gitlens.showStashList",
|
|
||||||
"when": "gitlens:enabled"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"command": "gitlens.copyShaToClipboard",
|
"command": "gitlens.copyShaToClipboard",
|
||||||
"when": "gitlens:isBlameable"
|
"when": "gitlens:isBlameable"
|
||||||
@@ -1475,10 +1466,6 @@
|
|||||||
],
|
],
|
||||||
"views": {
|
"views": {
|
||||||
"explorer": [
|
"explorer": [
|
||||||
{
|
|
||||||
"id": "gitlens.gitExplorer",
|
|
||||||
"name": "GitLens Explorer"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "gitlens.stashExplorer",
|
"id": "gitlens.stashExplorer",
|
||||||
"name": "Git Stashes"
|
"name": "Git Stashes"
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ export * from './commands/showQuickCurrentBranchHistory';
|
|||||||
export * from './commands/showQuickFileHistory';
|
export * from './commands/showQuickFileHistory';
|
||||||
export * from './commands/showQuickRepoStatus';
|
export * from './commands/showQuickRepoStatus';
|
||||||
export * from './commands/showQuickStashList';
|
export * from './commands/showQuickStashList';
|
||||||
export * from './commands/showStashList';
|
|
||||||
export * from './commands/stashApply';
|
export * from './commands/stashApply';
|
||||||
export * from './commands/stashDelete';
|
export * from './commands/stashDelete';
|
||||||
export * from './commands/stashSave';
|
export * from './commands/stashSave';
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ export type Commands = 'gitlens.closeUnchangedFiles' |
|
|||||||
'gitlens.showQuickRepoHistory' |
|
'gitlens.showQuickRepoHistory' |
|
||||||
'gitlens.showQuickRepoStatus' |
|
'gitlens.showQuickRepoStatus' |
|
||||||
'gitlens.showQuickStashList' |
|
'gitlens.showQuickStashList' |
|
||||||
'gitlens.showStashList' |
|
|
||||||
'gitlens.stashApply' |
|
'gitlens.stashApply' |
|
||||||
'gitlens.stashDelete' |
|
'gitlens.stashDelete' |
|
||||||
'gitlens.stashSave' |
|
'gitlens.stashSave' |
|
||||||
@@ -75,7 +74,6 @@ export const Commands = {
|
|||||||
ShowQuickCurrentBranchHistory: 'gitlens.showQuickRepoHistory' as Commands,
|
ShowQuickCurrentBranchHistory: 'gitlens.showQuickRepoHistory' as Commands,
|
||||||
ShowQuickRepoStatus: 'gitlens.showQuickRepoStatus' as Commands,
|
ShowQuickRepoStatus: 'gitlens.showQuickRepoStatus' as Commands,
|
||||||
ShowQuickStashList: 'gitlens.showQuickStashList' as Commands,
|
ShowQuickStashList: 'gitlens.showQuickStashList' as Commands,
|
||||||
ShowStashList: 'gitlens.showStashList' as Commands,
|
|
||||||
StashApply: 'gitlens.stashApply' as Commands,
|
StashApply: 'gitlens.stashApply' as Commands,
|
||||||
StashDelete: 'gitlens.stashDelete' as Commands,
|
StashDelete: 'gitlens.stashDelete' as Commands,
|
||||||
StashSave: 'gitlens.stashSave' as Commands,
|
StashSave: 'gitlens.stashSave' as Commands,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { GitBlameCommit, GitService, GitUri } from '../gitService';
|
|||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import { OpenInRemoteCommandArgs } from './openInRemote';
|
import { OpenInRemoteCommandArgs } from './openInRemote';
|
||||||
import { CommitNode } from '../views/gitExplorer';
|
import { CommitNode } from '../views/explorerNodes';
|
||||||
|
|
||||||
export interface OpenCommitInRemoteCommandArgs {
|
export interface OpenCommitInRemoteCommandArgs {
|
||||||
sha?: string;
|
sha?: string;
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
|
|
||||||
import { Commands, EditorCommand, getCommandUri } from './common';
|
|
||||||
import { StashExplorer } from '../views/stashExplorer';
|
|
||||||
import { GitService, GitUri } from '../gitService';
|
|
||||||
import { Messages } from '../messages';
|
|
||||||
import { Logger } from '../logger';
|
|
||||||
|
|
||||||
export class ShowStashListCommand extends EditorCommand {
|
|
||||||
|
|
||||||
constructor(private git: GitService, private explorer: StashExplorer) {
|
|
||||||
super(Commands.ShowStashList);
|
|
||||||
}
|
|
||||||
|
|
||||||
async execute(editor: TextEditor, edit: TextEditorEdit, uri?: Uri) {
|
|
||||||
uri = getCommandUri(uri, editor);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const repoPath = await this.git.getRepoPathFromUri(uri);
|
|
||||||
if (!repoPath) return Messages.showNoRepositoryWarningMessage(`Unable to show stashed changes`);
|
|
||||||
|
|
||||||
this.explorer.update(new GitUri(uri, { repoPath: repoPath, fileName: uri!.fsPath }));
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
Logger.error(ex, 'ShowStashListCommand');
|
|
||||||
return window.showErrorMessage(`Unable to show stash list. See output channel for more details`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,14 +12,14 @@ import { ShowBlameHistoryCommand, ShowFileHistoryCommand } from './commands';
|
|||||||
import { ShowLastQuickPickCommand } from './commands';
|
import { ShowLastQuickPickCommand } from './commands';
|
||||||
import { ShowQuickBranchHistoryCommand, ShowQuickCurrentBranchHistoryCommand, ShowQuickFileHistoryCommand } from './commands';
|
import { ShowQuickBranchHistoryCommand, ShowQuickCurrentBranchHistoryCommand, ShowQuickFileHistoryCommand } from './commands';
|
||||||
import { ShowCommitSearchCommand, ShowQuickCommitDetailsCommand, ShowQuickCommitFileDetailsCommand } from './commands';
|
import { ShowCommitSearchCommand, ShowQuickCommitDetailsCommand, ShowQuickCommitFileDetailsCommand } from './commands';
|
||||||
import { ShowQuickRepoStatusCommand, ShowQuickStashListCommand, ShowStashListCommand } from './commands';
|
import { ShowQuickRepoStatusCommand, ShowQuickStashListCommand } from './commands';
|
||||||
import { StashApplyCommand, StashDeleteCommand, StashSaveCommand } from './commands';
|
import { StashApplyCommand, StashDeleteCommand, StashSaveCommand } from './commands';
|
||||||
import { ToggleCodeLensCommand } from './commands';
|
import { ToggleCodeLensCommand } from './commands';
|
||||||
import { CodeLensLocations, IConfig, LineHighlightLocations } from './configuration';
|
import { CodeLensLocations, IConfig, LineHighlightLocations } from './configuration';
|
||||||
import { ApplicationInsightsKey, CommandContext, ExtensionKey, QualifiedExtensionId, setCommandContext, WorkspaceState } from './constants';
|
import { ApplicationInsightsKey, CommandContext, ExtensionKey, QualifiedExtensionId, setCommandContext, WorkspaceState } from './constants';
|
||||||
import { CurrentLineController, LineAnnotationType } from './currentLineController';
|
import { CurrentLineController, LineAnnotationType } from './currentLineController';
|
||||||
import { GitContentProvider } from './gitContentProvider';
|
import { GitContentProvider } from './gitContentProvider';
|
||||||
import { GitExplorer } from './views/gitExplorer';
|
// import { GitExplorer } from './views/gitExplorer';
|
||||||
import { StashExplorer } from './views/stashExplorer';
|
import { StashExplorer } from './views/stashExplorer';
|
||||||
import { GitRevisionCodeLensProvider } from './gitRevisionCodeLensProvider';
|
import { GitRevisionCodeLensProvider } from './gitRevisionCodeLensProvider';
|
||||||
import { GitContextTracker, GitService } from './gitService';
|
import { GitContextTracker, GitService } from './gitService';
|
||||||
@@ -89,16 +89,16 @@ export async function activate(context: ExtensionContext) {
|
|||||||
|
|
||||||
context.subscriptions.push(new Keyboard());
|
context.subscriptions.push(new Keyboard());
|
||||||
|
|
||||||
let explorer: GitExplorer | undefined = undefined;
|
// let explorer: GitExplorer | undefined = undefined;
|
||||||
if (cfg.insiders) {
|
// if (cfg.insiders) {
|
||||||
explorer = new GitExplorer(context, git);
|
// explorer = new GitExplorer(context, git);
|
||||||
context.subscriptions.push(window.registerTreeDataProvider('gitlens.gitExplorer', explorer));
|
// context.subscriptions.push(window.registerTreeDataProvider('gitlens.gitExplorer', explorer));
|
||||||
}
|
// }
|
||||||
|
|
||||||
let stashExplorer;
|
let stashExplorer;
|
||||||
if (cfg.insiders) {
|
if (cfg.insiders) {
|
||||||
stashExplorer = new StashExplorer(context, git);
|
stashExplorer = new StashExplorer(context, git);
|
||||||
context.subscriptions.push(window.registerTreeDataProvider('gitlens.stashExplorer', stashExplorer));
|
context.subscriptions.push(window.registerTreeDataProvider('gitlens.stashExplorer', stashExplorer));
|
||||||
context.subscriptions.push(new ShowStashListCommand(git, stashExplorer!));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context.subscriptions.push(new CloseUnchangedFilesCommand(git));
|
context.subscriptions.push(new CloseUnchangedFilesCommand(git));
|
||||||
@@ -125,7 +125,7 @@ export async function activate(context: ExtensionContext) {
|
|||||||
context.subscriptions.push(new ToggleLineBlameCommand(currentLineController));
|
context.subscriptions.push(new ToggleLineBlameCommand(currentLineController));
|
||||||
context.subscriptions.push(new ResetSuppressedWarningsCommand(context));
|
context.subscriptions.push(new ResetSuppressedWarningsCommand(context));
|
||||||
context.subscriptions.push(new ShowBlameHistoryCommand(git));
|
context.subscriptions.push(new ShowBlameHistoryCommand(git));
|
||||||
context.subscriptions.push(new ShowFileHistoryCommand(git, explorer));
|
context.subscriptions.push(new ShowFileHistoryCommand(git));
|
||||||
context.subscriptions.push(new ShowLastQuickPickCommand());
|
context.subscriptions.push(new ShowLastQuickPickCommand());
|
||||||
context.subscriptions.push(new ShowQuickBranchHistoryCommand(git));
|
context.subscriptions.push(new ShowQuickBranchHistoryCommand(git));
|
||||||
context.subscriptions.push(new ShowQuickCurrentBranchHistoryCommand(git));
|
context.subscriptions.push(new ShowQuickCurrentBranchHistoryCommand(git));
|
||||||
|
|||||||
Reference in New Issue
Block a user