Browse Source

Closes #2987 adds Clear Reviewed Files command

Fixes issues with reviewed files not clearing appropriately on clear/dismiss
main
Eric Amodio 1 year ago
parent
commit
19c2429796
7 changed files with 219 additions and 95 deletions
  1. +3
    -1
      CHANGELOG.md
  2. +91
    -13
      package.json
  3. +6
    -0
      src/views/nodes/compareBranchNode.ts
  4. +8
    -0
      src/views/nodes/compareResultsNode.ts
  5. +0
    -4
      src/views/nodes/viewNode.ts
  6. +14
    -2
      src/views/viewBase.ts
  7. +97
    -75
      src/views/viewCommands.ts

+ 3
- 1
CHANGELOG.md View File

@ -9,9 +9,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added ### Added
- Adds a _[Show|Hide] Merge Commits_ toggle to the Commits\_ view — closes [#1399](https://github.com/gitkraken/vscode-gitlens/issues/1399) thanks to [PR #1540](https://github.com/gitkraken/vscode-gitlens/pull/1540) by Shashank Shastri ([@Shashank-Shastri](https://github.com/Shashank-Shastri)) - Adds a _[Show|Hide] Merge Commits_ toggle to the Commits\_ view — closes [#1399](https://github.com/gitkraken/vscode-gitlens/issues/1399) thanks to [PR #1540](https://github.com/gitkraken/vscode-gitlens/pull/1540) by Shashank Shastri ([@Shashank-Shastri](https://github.com/Shashank-Shastri))
- Adds a _Clear Reviewed Files_ command to comparisons to clear all reviewed files — closes [#2987](https://github.com/gitkraken/vscode-gitlens/issues/2987)
### Fixed ### Fixed
- Fixes [#2987](https://github.com/gitkraken/vscode-gitlens/issues/2987) - Unable to remove all marks on reviewed files with a single operation
- Fixes [#2923](https://github.com/gitkraken/vscode-gitlens/issues/2923) - TypeError: Only absolute URLs are supported - Fixes [#2923](https://github.com/gitkraken/vscode-gitlens/issues/2923) - TypeError: Only absolute URLs are supported
- Fixes [#2926](https://github.com/gitkraken/vscode-gitlens/issues/2926) - "Open File at Revision" has incorrect editor label if revision contains path separator - Fixes [#2926](https://github.com/gitkraken/vscode-gitlens/issues/2926) - "Open File at Revision" has incorrect editor label if revision contains path separator
- Fixes [#2952](https://github.com/gitkraken/vscode-gitlens/issues/2952) - Inline blame not working because of missing ignoreRevsFile - Fixes [#2952](https://github.com/gitkraken/vscode-gitlens/issues/2952) - Inline blame not working because of missing ignoreRevsFile
@ -55,7 +57,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added ### Added
- Adds checkboxes to files in the _Search & Compare_ view to allow for tracking review progress — closes [#836](https://github.com/gitkraken/vscode-gitlens/issues/836)
- Adds checkboxes to files in comparisons to allow for tracking review progress — closes [#836](https://github.com/gitkraken/vscode-gitlens/issues/836)
- Allows the _Commit Graph_ to be open in the panel and in the editor area simultaneously - Allows the _Commit Graph_ to be open in the panel and in the editor area simultaneously
- Adds an _Open Changes_ button to commits in the file history quick pick menu — closes [#2641](https://github.com/gitkraken/vscode-gitlens/issues/2641) thanks to [PR #2800](https://github.com/gitkraken/vscode-gitlens/pull/2800) by Omar Ghazi ([@omarfesal](https://github.com/omarfesal)) - Adds an _Open Changes_ button to commits in the file history quick pick menu — closes [#2641](https://github.com/gitkraken/vscode-gitlens/issues/2641) thanks to [PR #2800](https://github.com/gitkraken/vscode-gitlens/pull/2800) by Omar Ghazi ([@omarfesal](https://github.com/omarfesal))

+ 91
- 13
package.json View File

@ -6528,12 +6528,17 @@
"icon": "$(git-pull-request)" "icon": "$(git-pull-request)"
}, },
{ {
"command": "gitlens.views.clearNode",
"title": "Clear",
"command": "gitlens.views.clearComparison",
"title": "Clear Comparison",
"category": "GitLens", "category": "GitLens",
"icon": "$(close)" "icon": "$(close)"
}, },
{ {
"command": "gitlens.views.clearReviewed",
"title": "Clear Reviewed Files",
"category": "GitLens"
},
{
"command": "gitlens.views.collapseNode", "command": "gitlens.views.collapseNode",
"title": "Collapse", "title": "Collapse",
"category": "GitLens" "category": "GitLens"
@ -9417,7 +9422,11 @@
"when": "false" "when": "false"
}, },
{ {
"command": "gitlens.views.clearNode",
"command": "gitlens.views.clearComparison",
"when": "false"
},
{
"command": "gitlens.views.clearReviewed",
"when": "false" "when": "false"
}, },
{ {
@ -12878,7 +12887,7 @@
"group": "inline@99" "group": "inline@99"
}, },
{ {
"command": "gitlens.views.clearNode",
"command": "gitlens.views.clearComparison",
"when": "viewItem =~ /gitlens:compare:branch\\b(?=.*?\\b\\+comparing\\b)/", "when": "viewItem =~ /gitlens:compare:branch\\b(?=.*?\\b\\+comparing\\b)/",
"group": "inline@99" "group": "inline@99"
}, },
@ -12913,11 +12922,16 @@
"group": "1_gitlens@2" "group": "1_gitlens@2"
}, },
{ {
"command": "gitlens.views.clearNode",
"command": "gitlens.views.clearReviewed",
"when": "viewItem =~ /gitlens:compare:branch\\b(?=.*?\\b\\+comparing\\b)/", "when": "viewItem =~ /gitlens:compare:branch\\b(?=.*?\\b\\+comparing\\b)/",
"group": "1_gitlens@3" "group": "1_gitlens@3"
}, },
{ {
"command": "gitlens.views.clearComparison",
"when": "viewItem =~ /gitlens:compare:branch\\b(?=.*?\\b\\+comparing\\b)/",
"group": "1_gitlens@4"
},
{
"command": "gitlens.views.branches.setShowBranchComparisonOff", "command": "gitlens.views.branches.setShowBranchComparisonOff",
"when": "view =~ /gitlens\\.views\\.branches\\b/ && viewItem =~ /gitlens:compare:branch\\b/", "when": "view =~ /gitlens\\.views\\.branches\\b/ && viewItem =~ /gitlens:compare:branch\\b/",
"group": "8_gitlens_toggles@1" "group": "8_gitlens_toggles@1"
@ -12943,16 +12957,31 @@
"group": "inline@1" "group": "inline@1"
}, },
{ {
"submenu": "gitlens/view/searchAndCompare/comparison/filter",
"submenu": "gitlens/comparison/results/files/filter/inline",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filterable\\b)(?!.*?\\b\\+filtered\\b)/", "when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filterable\\b)(?!.*?\\b\\+filtered\\b)/",
"group": "inline@1" "group": "inline@1"
}, },
{ {
"submenu": "gitlens/view/searchAndCompare/comparison/filtered",
"submenu": "gitlens/comparison/results/files/filtered/inline",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filterable\\b)(?=.*?\\b\\+filtered\\b)/", "when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filterable\\b)(?=.*?\\b\\+filtered\\b)/",
"group": "inline@1" "group": "inline@1"
}, },
{ {
"command": "gitlens.views.clearReviewed",
"when": "viewItem =~ /gitlens:results:files\\b/",
"group": "1_gitlens@1"
},
{
"submenu": "gitlens/comparison/results/files/filter",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filterable\\b)(?!.*?\\b\\+filtered\\b)/",
"group": "1_gitlens@2"
},
{
"submenu": "gitlens/comparison/results/files/filtered",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filterable\\b)(?=.*?\\b\\+filtered\\b)/",
"group": "1_gitlens@2"
},
{
"command": "gitlens.views.refreshNode", "command": "gitlens.views.refreshNode",
"when": "viewItem =~ /gitlens:compare:(branch(?=.*?\\b\\+comparing\\b)|results(?!:))\\b/", "when": "viewItem =~ /gitlens:compare:(branch(?=.*?\\b\\+comparing\\b)|results(?!:))\\b/",
"group": "inline@97" "group": "inline@97"
@ -12973,6 +13002,11 @@
"group": "1_gitlens_actions@2" "group": "1_gitlens_actions@2"
}, },
{ {
"command": "gitlens.views.clearReviewed",
"when": "viewItem =~ /gitlens:compare:results(?!:)/",
"group": "1_gitlens_actions@3"
},
{
"command": "gitlens.openComparisonOnRemote", "command": "gitlens.openComparisonOnRemote",
"when": "viewItem =~ /gitlens:compare:results(?!:)\\b/", "when": "viewItem =~ /gitlens:compare:results(?!:)\\b/",
"group": "2_gitlens_quickopen@1 && gitlens:hasRemotes", "group": "2_gitlens_quickopen@1 && gitlens:hasRemotes",
@ -14355,7 +14389,24 @@
"group": "navigation@11" "group": "navigation@11"
} }
], ],
"gitlens/view/searchAndCompare/comparison/filter": [
"gitlens/comparison/results/files/filter": [
{
"command": "gitlens.views.searchAndCompare.setFilesFilterOff",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filtered\\b)/",
"group": "navigation@1"
},
{
"command": "gitlens.views.searchAndCompare.setFilesFilterOnLeft",
"when1": "viewItem =~ /gitlens:results:files\\b(?!.*?\\b\\+filtered~left\\b)/",
"group": "navigation_1@1"
},
{
"command": "gitlens.views.searchAndCompare.setFilesFilterOnRight",
"when1": "viewItem =~ /gitlens:results:files\\b(?!.*?\\b\\+filtered~right\\b)/",
"group": "navigation_1@2"
}
],
"gitlens/comparison/results/files/filter/inline": [
{ {
"command": "gitlens.views.searchAndCompare.setFilesFilterOff", "command": "gitlens.views.searchAndCompare.setFilesFilterOff",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filtered\\b)/", "when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filtered\\b)/",
@ -14372,7 +14423,24 @@
"group": "navigation_1@2" "group": "navigation_1@2"
} }
], ],
"gitlens/view/searchAndCompare/comparison/filtered": [
"gitlens/comparison/results/files/filtered": [
{
"command": "gitlens.views.searchAndCompare.setFilesFilterOff",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filtered\\b)/",
"group": "navigation@1"
},
{
"command": "gitlens.views.searchAndCompare.setFilesFilterOnLeft",
"when1": "viewItem =~ /gitlens:results:files\\b(?!.*?\\b\\+filtered~left\\b)/",
"group": "navigation_1@1"
},
{
"command": "gitlens.views.searchAndCompare.setFilesFilterOnRight",
"when1": "viewItem =~ /gitlens:results:files\\b(?!.*?\\b\\+filtered~right\\b)/",
"group": "navigation_1@2"
}
],
"gitlens/comparison/results/files/filtered/inline": [
{ {
"command": "gitlens.views.searchAndCompare.setFilesFilterOff", "command": "gitlens.views.searchAndCompare.setFilesFilterOff",
"when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filtered\\b)/", "when": "viewItem =~ /gitlens:results:files\\b(?=.*?\\b\\+filtered\\b)/",
@ -14510,13 +14578,23 @@
"icon": "$(add)" "icon": "$(add)"
}, },
{ {
"id": "gitlens/view/searchAndCompare/comparison/filter",
"label": "Filter",
"id": "gitlens/comparison/results/files/filter",
"label": "Filter Files",
"icon": "$(filter)"
},
{
"id": "gitlens/comparison/results/files/filter/inline",
"label": "Filter Files",
"icon": "$(filter)" "icon": "$(filter)"
}, },
{ {
"id": "gitlens/view/searchAndCompare/comparison/filtered",
"label": "Filter",
"id": "gitlens/comparison/results/files/filtered",
"label": "Filter Files",
"icon": "$(filter-filled)"
},
{
"id": "gitlens/comparison/results/files/filtered/inline",
"label": "Filter Files",
"icon": "$(filter-filled)" "icon": "$(filter-filled)"
} }
], ],

+ 6
- 0
src/views/nodes/compareBranchNode.ts View File

@ -239,6 +239,12 @@ export class CompareBranchNode extends SubscribeableViewNode<
} }
@log() @log()
clearReviewed() {
void this.storeCompareWith(true);
void this.triggerChange();
}
@log()
async edit() { async edit() {
await this.compareWith(); await this.compareWith();
} }

+ 8
- 0
src/views/nodes/compareResultsNode.ts View File

@ -234,6 +234,12 @@ export class CompareResultsNode extends SubscribeableViewNode<'compare-results',
} }
@log() @log()
clearReviewed() {
resetComparisonCheckedFiles(this.view, this.getStorageId());
void this.store();
}
@log()
async swap() { async swap() {
if (this._ref.ref === '') { if (this._ref.ref === '') {
void window.showErrorMessage('Cannot swap comparisons with the working tree'); void window.showErrorMessage('Cannot swap comparisons with the working tree');
@ -375,10 +381,12 @@ export class CompareResultsNode extends SubscribeableViewNode<'compare-results',
} }
private remove(silent: boolean = false) { private remove(silent: boolean = false) {
resetComparisonCheckedFiles(this.view, this.getStorageId());
return this.view.updateStorage(this.getStorageId(), undefined, silent); return this.view.updateStorage(this.getStorageId(), undefined, silent);
} }
private async replace(id: string, silent: boolean = false) { private async replace(id: string, silent: boolean = false) {
resetComparisonCheckedFiles(this.view, id);
await this.view.updateStorage(id, undefined, silent); await this.view.updateStorage(id, undefined, silent);
return this.store(silent); return this.store(silent);
} }

+ 0
- 4
src/views/nodes/viewNode.ts View File

@ -815,10 +815,6 @@ export function canAutoRefreshView(view: View): view is View & AutoRefreshableVi
return isA<View & AutoRefreshableView>(view, 'onDidChangeAutoRefresh'); return isA<View & AutoRefreshableView>(view, 'onDidChangeAutoRefresh');
} }
export function canClearNode(node: ViewNode): node is ViewNode & { clear(): void | Promise<void> } {
return typeof (node as ViewNode & { clear(): void | Promise<void> }).clear === 'function';
}
export function canEditNode(node: ViewNode): node is ViewNode & { edit(): void | Promise<void> } { export function canEditNode(node: ViewNode): node is ViewNode & { edit(): void | Promise<void> } {
return typeof (node as ViewNode & { edit(): void | Promise<void> }).edit === 'function'; return typeof (node as ViewNode & { edit(): void | Promise<void> }).edit === 'function';
} }

+ 14
- 2
src/views/viewBase.ts View File

@ -757,6 +757,9 @@ export class ViewNodeState implements Disposable {
for (const [id, map] of store) { for (const [id, map] of store) {
if (id.startsWith(prefix)) { if (id.startsWith(prefix)) {
map.delete(key); map.delete(key);
if (map.size === 0) {
store.delete(id);
}
} }
} }
} }
@ -767,8 +770,17 @@ export class ViewNodeState implements Disposable {
this._store?.delete(id); this._store?.delete(id);
this._stickyStore?.delete(id); this._stickyStore?.delete(id);
} else { } else {
this._store?.get(id)?.delete(key);
this._stickyStore?.get(id)?.delete(key);
for (const store of [this._store, this._stickyStore]) {
if (store == null) continue;
const map = store.get(id);
if (map == null) continue;
map.delete(key);
if (map.size === 0) {
store.delete(id);
}
}
} }
} }

+ 97
- 75
src/views/viewCommands.ts View File

@ -33,7 +33,7 @@ import {
} from '../system/command'; } from '../system/command';
import { configuration } from '../system/configuration'; import { configuration } from '../system/configuration';
import { setContext } from '../system/context'; import { setContext } from '../system/context';
import { debug } from '../system/decorators/log';
import { log } from '../system/decorators/log';
import { sequentialize } from '../system/function'; import { sequentialize } from '../system/function';
import type { OpenWorkspaceLocation } from '../system/utils'; import type { OpenWorkspaceLocation } from '../system/utils';
import { openWorkspace } from '../system/utils'; import { openWorkspace } from '../system/utils';
@ -61,7 +61,6 @@ import { StatusFileNode } from './nodes/statusFileNode';
import { TagNode } from './nodes/tagNode'; import { TagNode } from './nodes/tagNode';
import type { TagsNode } from './nodes/tagsNode'; import type { TagsNode } from './nodes/tagsNode';
import { import {
canClearNode,
canEditNode, canEditNode,
canViewDismissNode, canViewDismissNode,
getNodeRepoPath, getNodeRepoPath,
@ -122,7 +121,8 @@ export function registerViewCommand(
export class ViewCommands { export class ViewCommands {
constructor(private readonly container: Container) { constructor(private readonly container: Container) {
registerViewCommand('gitlens.views.clearNode', (n: ViewNode) => canClearNode(n) && n.clear(), this);
registerViewCommand('gitlens.views.clearComparison', n => this.clearComparison(n), this);
registerViewCommand('gitlens.views.clearReviewed', n => this.clearReviewed(n), this);
// Register independently as it already handles copying multiple nodes // Register independently as it already handles copying multiple nodes
registerCommand( registerCommand(
Commands.ViewsCopy, Commands.ViewsCopy,
@ -312,12 +312,12 @@ export class ViewCommands {
); );
} }
@debug()
@log()
private addAuthors(node?: ViewNode) { private addAuthors(node?: ViewNode) {
return ContributorActions.addAuthors(getNodeRepoPath(node)); return ContributorActions.addAuthors(getNodeRepoPath(node));
} }
@debug()
@log()
private addAuthor(node?: ContributorNode) { private addAuthor(node?: ContributorNode) {
if (node instanceof ContributorNode) { if (node instanceof ContributorNode) {
return ContributorActions.addAuthors( return ContributorActions.addAuthors(
@ -329,12 +329,12 @@ export class ViewCommands {
return Promise.resolve(); return Promise.resolve();
} }
@debug()
@log()
private addRemote(node?: ViewNode) { private addRemote(node?: ViewNode) {
return RemoteActions.add(getNodeRepoPath(node)); return RemoteActions.add(getNodeRepoPath(node));
} }
@debug()
@log()
private applyChanges(node: ViewRefFileNode) { private applyChanges(node: ViewRefFileNode) {
if (!(node instanceof ViewRefFileNode)) return Promise.resolve(); if (!(node instanceof ViewRefFileNode)) return Promise.resolve();
@ -351,12 +351,12 @@ export class ViewCommands {
return CommitActions.applyChanges(node.file, node.ref); return CommitActions.applyChanges(node.file, node.ref);
} }
@debug()
@log()
private applyStash() { private applyStash() {
return StashActions.apply(); return StashActions.apply();
} }
@debug()
@log()
private browseRepoAtRevision( private browseRepoAtRevision(
node: ViewRefNode | ViewRefFileNode, node: ViewRefNode | ViewRefFileNode,
options?: { before?: boolean; openInNewWindow?: boolean }, options?: { before?: boolean; openInNewWindow?: boolean },
@ -369,7 +369,7 @@ export class ViewCommands {
}); });
} }
@debug()
@log()
private cherryPick(node: CommitNode, nodes?: CommitNode[]) { private cherryPick(node: CommitNode, nodes?: CommitNode[]) {
if (!(node instanceof CommitNode)) return Promise.resolve(); if (!(node instanceof CommitNode)) return Promise.resolve();
@ -383,14 +383,36 @@ export class ViewCommands {
return RepoActions.cherryPick(node.repoPath, node.ref); return RepoActions.cherryPick(node.repoPath, node.ref);
} }
@debug()
@log()
private clearComparison(node: ViewNode) {
if (node.is('compare-branch')) {
void node.clear();
}
}
@log()
private clearReviewed(node: ViewNode) {
let compareNode;
if (node.is('results-files')) {
compareNode = node.getParent();
if (compareNode == null) return;
} else {
compareNode = node;
}
if (compareNode.is('compare-branch') || compareNode.is('compare-results')) {
compareNode.clearReviewed();
}
}
@log()
private closeRepository(node: RepositoryNode | RepositoryFolderNode) { private closeRepository(node: RepositoryNode | RepositoryFolderNode) {
if (!(node instanceof RepositoryNode) && !(node instanceof RepositoryFolderNode)) return; if (!(node instanceof RepositoryNode) && !(node instanceof RepositoryFolderNode)) return;
node.repo.closed = true; node.repo.closed = true;
} }
@debug()
@log()
private async createBranch(node?: ViewRefNode | ViewRefFileNode | BranchesNode | BranchTrackingStatusNode) { private async createBranch(node?: ViewRefNode | ViewRefFileNode | BranchesNode | BranchTrackingStatusNode) {
let from = let from =
node instanceof ViewRefNode || node instanceof ViewRefFileNode node instanceof ViewRefNode || node instanceof ViewRefFileNode
@ -407,7 +429,7 @@ export class ViewCommands {
return BranchActions.create(node?.repoPath, from); return BranchActions.create(node?.repoPath, from);
} }
@debug()
@log()
private async createPullRequest(node: BranchNode | BranchTrackingStatusNode) { private async createPullRequest(node: BranchNode | BranchTrackingStatusNode) {
if (!(node instanceof BranchNode) && !(node instanceof BranchTrackingStatusNode)) { if (!(node instanceof BranchNode) && !(node instanceof BranchTrackingStatusNode)) {
return Promise.resolve(); return Promise.resolve();
@ -440,7 +462,7 @@ export class ViewCommands {
}); });
} }
@debug()
@log()
private async createTag(node?: ViewRefNode | ViewRefFileNode | TagsNode | BranchTrackingStatusNode) { private async createTag(node?: ViewRefNode | ViewRefFileNode | TagsNode | BranchTrackingStatusNode) {
let from = let from =
node instanceof ViewRefNode || node instanceof ViewRefFileNode node instanceof ViewRefNode || node instanceof ViewRefFileNode
@ -457,7 +479,7 @@ export class ViewCommands {
return TagActions.create(node?.repoPath, from); return TagActions.create(node?.repoPath, from);
} }
@debug()
@log()
private async createWorktree(node?: BranchNode | WorktreesNode) { private async createWorktree(node?: BranchNode | WorktreesNode) {
if (node instanceof WorktreesNode) { if (node instanceof WorktreesNode) {
node = undefined; node = undefined;
@ -467,14 +489,14 @@ export class ViewCommands {
return WorktreeActions.create(node?.repoPath, undefined, node?.ref); return WorktreeActions.create(node?.repoPath, undefined, node?.ref);
} }
@debug()
@log()
private deleteBranch(node: BranchNode) { private deleteBranch(node: BranchNode) {
if (!(node instanceof BranchNode)) return Promise.resolve(); if (!(node instanceof BranchNode)) return Promise.resolve();
return BranchActions.remove(node.repoPath, node.branch); return BranchActions.remove(node.repoPath, node.branch);
} }
@debug()
@log()
private deleteStash(node: StashNode, nodes?: StashNode[]) { private deleteStash(node: StashNode, nodes?: StashNode[]) {
if (!(node instanceof StashNode)) return Promise.resolve(); if (!(node instanceof StashNode)) return Promise.resolve();
@ -490,28 +512,28 @@ export class ViewCommands {
return StashActions.drop(node.repoPath, node.commit); return StashActions.drop(node.repoPath, node.commit);
} }
@debug()
@log()
private renameStash(node: StashNode) { private renameStash(node: StashNode) {
if (!(node instanceof StashNode)) return Promise.resolve(); if (!(node instanceof StashNode)) return Promise.resolve();
return StashActions.rename(node.repoPath, node.commit); return StashActions.rename(node.repoPath, node.commit);
} }
@debug()
@log()
private deleteTag(node: TagNode) { private deleteTag(node: TagNode) {
if (!(node instanceof TagNode)) return Promise.resolve(); if (!(node instanceof TagNode)) return Promise.resolve();
return TagActions.remove(node.repoPath, node.tag); return TagActions.remove(node.repoPath, node.tag);
} }
@debug()
@log()
private async deleteWorktree(node: WorktreeNode) { private async deleteWorktree(node: WorktreeNode) {
if (!(node instanceof WorktreeNode)) return undefined; if (!(node instanceof WorktreeNode)) return undefined;
return WorktreeActions.remove(node.repoPath, node.worktree.uri); return WorktreeActions.remove(node.repoPath, node.worktree.uri);
} }
@debug()
@log()
private fetch(node: RemoteNode | RepositoryNode | RepositoryFolderNode | BranchNode | BranchTrackingStatusNode) { private fetch(node: RemoteNode | RepositoryNode | RepositoryFolderNode | BranchNode | BranchTrackingStatusNode) {
if (node instanceof RepositoryNode || node instanceof RepositoryFolderNode) return RepoActions.fetch(node.repo); if (node instanceof RepositoryNode || node instanceof RepositoryFolderNode) return RepoActions.fetch(node.repo);
if (node instanceof RemoteNode) return RemoteActions.fetch(node.remote.repoPath, node.remote.name); if (node instanceof RemoteNode) return RemoteActions.fetch(node.remote.repoPath, node.remote.name);
@ -522,7 +544,7 @@ export class ViewCommands {
return Promise.resolve(); return Promise.resolve();
} }
@debug()
@log()
private async highlightChanges(node: CommitFileNode | StashFileNode | FileRevisionAsCommitNode | ResultsFileNode) { private async highlightChanges(node: CommitFileNode | StashFileNode | FileRevisionAsCommitNode | ResultsFileNode) {
if ( if (
!(node instanceof CommitFileNode) && !(node instanceof CommitFileNode) &&
@ -542,7 +564,7 @@ export class ViewCommands {
)); ));
} }
@debug()
@log()
private async highlightRevisionChanges( private async highlightRevisionChanges(
node: CommitFileNode | StashFileNode | FileRevisionAsCommitNode | ResultsFileNode, node: CommitFileNode | StashFileNode | FileRevisionAsCommitNode | ResultsFileNode,
) { ) {
@ -564,21 +586,21 @@ export class ViewCommands {
)); ));
} }
@debug()
@log()
private merge(node: BranchNode | TagNode) { private merge(node: BranchNode | TagNode) {
if (!(node instanceof BranchNode) && !(node instanceof TagNode)) return Promise.resolve(); if (!(node instanceof BranchNode) && !(node instanceof TagNode)) return Promise.resolve();
return RepoActions.merge(node.repoPath, node instanceof BranchNode ? node.branch : node.tag); return RepoActions.merge(node.repoPath, node instanceof BranchNode ? node.branch : node.tag);
} }
@debug()
@log()
private openInTerminal(node: RepositoryNode | RepositoryFolderNode) { private openInTerminal(node: RepositoryNode | RepositoryFolderNode) {
if (!(node instanceof RepositoryNode) && !(node instanceof RepositoryFolderNode)) return Promise.resolve(); if (!(node instanceof RepositoryNode) && !(node instanceof RepositoryFolderNode)) return Promise.resolve();
return executeCoreCommand('openInTerminal', Uri.file(node.repo.path)); return executeCoreCommand('openInTerminal', Uri.file(node.repo.path));
} }
@debug()
@log()
private openPullRequest(node: PullRequestNode) { private openPullRequest(node: PullRequestNode) {
if (!(node instanceof PullRequestNode)) return Promise.resolve(); if (!(node instanceof PullRequestNode)) return Promise.resolve();
@ -596,28 +618,28 @@ export class ViewCommands {
}); });
} }
@debug()
@log()
private openWorktree(node: WorktreeNode, options?: { location?: OpenWorkspaceLocation }) { private openWorktree(node: WorktreeNode, options?: { location?: OpenWorkspaceLocation }) {
if (!(node instanceof WorktreeNode)) return; if (!(node instanceof WorktreeNode)) return;
openWorkspace(node.worktree.uri, options); openWorkspace(node.worktree.uri, options);
} }
@debug()
@log()
private pruneRemote(node: RemoteNode) { private pruneRemote(node: RemoteNode) {
if (!(node instanceof RemoteNode)) return Promise.resolve(); if (!(node instanceof RemoteNode)) return Promise.resolve();
return RemoteActions.prune(node.remote.repoPath, node.remote.name); return RemoteActions.prune(node.remote.repoPath, node.remote.name);
} }
@debug()
@log()
private async removeRemote(node: RemoteNode) { private async removeRemote(node: RemoteNode) {
if (!(node instanceof RemoteNode)) return Promise.resolve(); if (!(node instanceof RemoteNode)) return Promise.resolve();
return RemoteActions.remove(node.remote.repoPath, node.remote.name); return RemoteActions.remove(node.remote.repoPath, node.remote.name);
} }
@debug()
@log()
private publishBranch(node: BranchNode | BranchTrackingStatusNode) { private publishBranch(node: BranchNode | BranchTrackingStatusNode) {
if (node instanceof BranchNode || node instanceof BranchTrackingStatusNode) { if (node instanceof BranchNode || node instanceof BranchTrackingStatusNode) {
return RepoActions.push(node.repoPath, undefined, node.branch); return RepoActions.push(node.repoPath, undefined, node.branch);
@ -625,7 +647,7 @@ export class ViewCommands {
return Promise.resolve(); return Promise.resolve();
} }
@debug()
@log()
private publishRepository(node: BranchNode | BranchTrackingStatusNode) { private publishRepository(node: BranchNode | BranchTrackingStatusNode) {
if (node instanceof BranchNode || node instanceof BranchTrackingStatusNode) { if (node instanceof BranchNode || node instanceof BranchTrackingStatusNode) {
return executeCoreGitCommand('git.publish', Uri.file(node.repoPath)); return executeCoreGitCommand('git.publish', Uri.file(node.repoPath));
@ -633,7 +655,7 @@ export class ViewCommands {
return Promise.resolve(); return Promise.resolve();
} }
@debug()
@log()
private pull(node: RepositoryNode | RepositoryFolderNode | BranchNode | BranchTrackingStatusNode) { private pull(node: RepositoryNode | RepositoryFolderNode | BranchNode | BranchTrackingStatusNode) {
if (node instanceof RepositoryNode || node instanceof RepositoryFolderNode) return RepoActions.pull(node.repo); if (node instanceof RepositoryNode || node instanceof RepositoryFolderNode) return RepoActions.pull(node.repo);
if (node instanceof BranchNode || node instanceof BranchTrackingStatusNode) { if (node instanceof BranchNode || node instanceof BranchTrackingStatusNode) {
@ -643,7 +665,7 @@ export class ViewCommands {
return Promise.resolve(); return Promise.resolve();
} }
@debug()
@log()
private push( private push(
node: node:
| RepositoryNode | RepositoryNode
@ -673,14 +695,14 @@ export class ViewCommands {
return Promise.resolve(); return Promise.resolve();
} }
@debug()
@log()
private pushToCommit(node: CommitNode | FileRevisionAsCommitNode) { private pushToCommit(node: CommitNode | FileRevisionAsCommitNode) {
if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve(); if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve();
return RepoActions.push(node.repoPath, false, node.commit); return RepoActions.push(node.repoPath, false, node.commit);
} }
@debug()
@log()
private rebase(node: BranchNode | CommitNode | FileRevisionAsCommitNode | TagNode) { private rebase(node: BranchNode | CommitNode | FileRevisionAsCommitNode | TagNode) {
if ( if (
!(node instanceof BranchNode) && !(node instanceof BranchNode) &&
@ -694,7 +716,7 @@ export class ViewCommands {
return RepoActions.rebase(node.repoPath, node.ref); return RepoActions.rebase(node.repoPath, node.ref);
} }
@debug()
@log()
private rebaseToRemote(node: BranchNode | BranchTrackingStatusNode) { private rebaseToRemote(node: BranchNode | BranchTrackingStatusNode) {
if (!(node instanceof BranchNode) && !(node instanceof BranchTrackingStatusNode)) return Promise.resolve(); if (!(node instanceof BranchNode) && !(node instanceof BranchTrackingStatusNode)) return Promise.resolve();
@ -711,14 +733,14 @@ export class ViewCommands {
); );
} }
@debug()
@log()
private renameBranch(node: BranchNode) { private renameBranch(node: BranchNode) {
if (!(node instanceof BranchNode)) return Promise.resolve(); if (!(node instanceof BranchNode)) return Promise.resolve();
return BranchActions.rename(node.repoPath, node.branch); return BranchActions.rename(node.repoPath, node.branch);
} }
@debug()
@log()
private resetCommit(node: CommitNode | FileRevisionAsCommitNode) { private resetCommit(node: CommitNode | FileRevisionAsCommitNode) {
if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve(); if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve();
@ -732,14 +754,14 @@ export class ViewCommands {
); );
} }
@debug()
@log()
private resetToCommit(node: CommitNode | FileRevisionAsCommitNode) { private resetToCommit(node: CommitNode | FileRevisionAsCommitNode) {
if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve(); if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve();
return RepoActions.reset(node.repoPath, node.ref); return RepoActions.reset(node.repoPath, node.ref);
} }
@debug()
@log()
private resetToTip(node: BranchNode) { private resetToTip(node: BranchNode) {
if (!(node instanceof BranchNode)) return Promise.resolve(); if (!(node instanceof BranchNode)) return Promise.resolve();
@ -749,54 +771,54 @@ export class ViewCommands {
); );
} }
@debug()
@log()
private restore(node: ViewRefFileNode) { private restore(node: ViewRefFileNode) {
if (!(node instanceof ViewRefFileNode)) return Promise.resolve(); if (!(node instanceof ViewRefFileNode)) return Promise.resolve();
return CommitActions.restoreFile(node.file, node.ref); return CommitActions.restoreFile(node.file, node.ref);
} }
@debug()
@log()
private revealRepositoryInExplorer(node: RepositoryNode) { private revealRepositoryInExplorer(node: RepositoryNode) {
if (!(node instanceof RepositoryNode)) return undefined; if (!(node instanceof RepositoryNode)) return undefined;
return RepoActions.revealInFileExplorer(node.repo); return RepoActions.revealInFileExplorer(node.repo);
} }
@debug()
@log()
private revealWorktreeInExplorer(node: WorktreeNode) { private revealWorktreeInExplorer(node: WorktreeNode) {
if (!(node instanceof WorktreeNode)) return undefined; if (!(node instanceof WorktreeNode)) return undefined;
return WorktreeActions.revealInFileExplorer(node.worktree); return WorktreeActions.revealInFileExplorer(node.worktree);
} }
@debug()
@log()
private revert(node: CommitNode | FileRevisionAsCommitNode) { private revert(node: CommitNode | FileRevisionAsCommitNode) {
if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve(); if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return Promise.resolve();
return RepoActions.revert(node.repoPath, node.ref); return RepoActions.revert(node.repoPath, node.ref);
} }
@debug()
@log()
private setAsDefault(node: RemoteNode) { private setAsDefault(node: RemoteNode) {
if (!(node instanceof RemoteNode)) return Promise.resolve(); if (!(node instanceof RemoteNode)) return Promise.resolve();
return node.setAsDefault(); return node.setAsDefault();
} }
@debug()
@log()
private setBranchComparison(node: ViewNode, comparisonType: Exclude<ViewShowBranchComparison, false>) { private setBranchComparison(node: ViewNode, comparisonType: Exclude<ViewShowBranchComparison, false>) {
if (!(node instanceof CompareBranchNode)) return undefined; if (!(node instanceof CompareBranchNode)) return undefined;
return node.setComparisonType(comparisonType); return node.setComparisonType(comparisonType);
} }
@debug()
@log()
private setShowRelativeDateMarkers(enabled: boolean) { private setShowRelativeDateMarkers(enabled: boolean) {
return configuration.updateEffective('views.showRelativeDateMarkers', enabled); return configuration.updateEffective('views.showRelativeDateMarkers', enabled);
} }
@debug()
@log()
private async stageFile(node: CommitFileNode | FileRevisionAsCommitNode | StatusFileNode) { private async stageFile(node: CommitFileNode | FileRevisionAsCommitNode | StatusFileNode) {
if ( if (
!(node instanceof CommitFileNode) && !(node instanceof CommitFileNode) &&
@ -810,7 +832,7 @@ export class ViewCommands {
void node.triggerChange(); void node.triggerChange();
} }
@debug()
@log()
private async stageDirectory(node: FolderNode) { private async stageDirectory(node: FolderNode) {
if (!(node instanceof FolderNode) || !node.relativePath) return; if (!(node instanceof FolderNode) || !node.relativePath) return;
@ -818,7 +840,7 @@ export class ViewCommands {
void node.triggerChange(); void node.triggerChange();
} }
@debug()
@log()
private star(node: BranchNode | RepositoryNode | RepositoryFolderNode) { private star(node: BranchNode | RepositoryNode | RepositoryFolderNode) {
if ( if (
!(node instanceof BranchNode) && !(node instanceof BranchNode) &&
@ -831,12 +853,12 @@ export class ViewCommands {
return node.star(); return node.star();
} }
@debug()
@log()
private switch(node?: ViewNode) { private switch(node?: ViewNode) {
return RepoActions.switchTo(getNodeRepoPath(node)); return RepoActions.switchTo(getNodeRepoPath(node));
} }
@debug()
@log()
private switchTo(node?: ViewNode) { private switchTo(node?: ViewNode) {
if (node instanceof ViewRefNode) { if (node instanceof ViewRefNode) {
return RepoActions.switchTo( return RepoActions.switchTo(
@ -848,7 +870,7 @@ export class ViewCommands {
return RepoActions.switchTo(getNodeRepoPath(node)); return RepoActions.switchTo(getNodeRepoPath(node));
} }
@debug()
@log()
private async undoCommit(node: CommitNode | FileRevisionAsCommitNode) { private async undoCommit(node: CommitNode | FileRevisionAsCommitNode) {
if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return; if (!(node instanceof CommitNode) && !(node instanceof FileRevisionAsCommitNode)) return;
@ -869,14 +891,14 @@ export class ViewCommands {
await executeCoreGitCommand('git.undoCommit', node.repoPath); await executeCoreGitCommand('git.undoCommit', node.repoPath);
} }
@debug()
@log()
private unsetAsDefault(node: RemoteNode) { private unsetAsDefault(node: RemoteNode) {
if (!(node instanceof RemoteNode)) return Promise.resolve(); if (!(node instanceof RemoteNode)) return Promise.resolve();
return node.setAsDefault(false); return node.setAsDefault(false);
} }
@debug()
@log()
private async unstageFile(node: CommitFileNode | FileRevisionAsCommitNode | StatusFileNode) { private async unstageFile(node: CommitFileNode | FileRevisionAsCommitNode | StatusFileNode) {
if ( if (
!(node instanceof CommitFileNode) && !(node instanceof CommitFileNode) &&
@ -890,7 +912,7 @@ export class ViewCommands {
void node.triggerChange(); void node.triggerChange();
} }
@debug()
@log()
private async unstageDirectory(node: FolderNode) { private async unstageDirectory(node: FolderNode) {
if (!(node instanceof FolderNode) || !node.relativePath) return; if (!(node instanceof FolderNode) || !node.relativePath) return;
@ -898,7 +920,7 @@ export class ViewCommands {
void node.triggerChange(); void node.triggerChange();
} }
@debug()
@log()
private unstar(node: BranchNode | RepositoryNode | RepositoryFolderNode) { private unstar(node: BranchNode | RepositoryNode | RepositoryFolderNode) {
if ( if (
!(node instanceof BranchNode) && !(node instanceof BranchNode) &&
@ -911,7 +933,7 @@ export class ViewCommands {
return node.unstar(); return node.unstar();
} }
@debug()
@log()
private compareHeadWith(node: ViewRefNode | ViewRefFileNode) { private compareHeadWith(node: ViewRefNode | ViewRefFileNode) {
if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return Promise.resolve(); if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return Promise.resolve();
@ -922,7 +944,7 @@ export class ViewCommands {
return this.container.searchAndCompareView.compare(node.repoPath, 'HEAD', node.ref); return this.container.searchAndCompareView.compare(node.repoPath, 'HEAD', node.ref);
} }
@debug()
@log()
private compareWithUpstream(node: BranchNode) { private compareWithUpstream(node: BranchNode) {
if (!(node instanceof BranchNode)) return Promise.resolve(); if (!(node instanceof BranchNode)) return Promise.resolve();
if (node.branch.upstream == null) return Promise.resolve(); if (node.branch.upstream == null) return Promise.resolve();
@ -930,7 +952,7 @@ export class ViewCommands {
return this.container.searchAndCompareView.compare(node.repoPath, node.ref, node.branch.upstream.name); return this.container.searchAndCompareView.compare(node.repoPath, node.ref, node.branch.upstream.name);
} }
@debug()
@log()
private compareWorkingWith(node: ViewRefNode | ViewRefFileNode) { private compareWorkingWith(node: ViewRefNode | ViewRefFileNode) {
if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return Promise.resolve(); if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return Promise.resolve();
@ -941,7 +963,7 @@ export class ViewCommands {
return this.container.searchAndCompareView.compare(node.repoPath, '', node.ref); return this.container.searchAndCompareView.compare(node.repoPath, '', node.ref);
} }
@debug()
@log()
private async compareAncestryWithWorking(node: BranchNode) { private async compareAncestryWithWorking(node: BranchNode) {
if (!(node instanceof BranchNode)) return undefined; if (!(node instanceof BranchNode)) return undefined;
@ -961,14 +983,14 @@ export class ViewCommands {
); );
} }
@debug()
@log()
private compareWithSelected(node: ViewRefNode | ViewRefFileNode) { private compareWithSelected(node: ViewRefNode | ViewRefFileNode) {
if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return; if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return;
this.container.searchAndCompareView.compareWithSelected(node.repoPath, node.ref); this.container.searchAndCompareView.compareWithSelected(node.repoPath, node.ref);
} }
@debug()
@log()
private selectForCompare(node: ViewRefNode | ViewRefFileNode) { private selectForCompare(node: ViewRefNode | ViewRefFileNode) {
if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return; if (!(node instanceof ViewRefNode) && !(node instanceof ViewRefFileNode)) return;
@ -999,7 +1021,7 @@ export class ViewCommands {
}); });
} }
@debug()
@log()
private compareFileWithSelected(node: ViewRefFileNode) { private compareFileWithSelected(node: ViewRefFileNode) {
if (this._selectedFile == null || !(node instanceof ViewRefFileNode) || node.ref == null) { if (this._selectedFile == null || !(node instanceof ViewRefFileNode) || node.ref == null) {
return Promise.resolve(); return Promise.resolve();
@ -1020,7 +1042,7 @@ export class ViewCommands {
private _selectedFile: CompareSelectedInfo | undefined; private _selectedFile: CompareSelectedInfo | undefined;
@debug()
@log()
private selectFileForCompare(node: ViewRefFileNode) { private selectFileForCompare(node: ViewRefFileNode) {
if (!(node instanceof ViewRefFileNode) || node.ref == null) return; if (!(node instanceof ViewRefFileNode) || node.ref == null) return;
@ -1032,7 +1054,7 @@ export class ViewCommands {
void setContext('gitlens:views:canCompare:file', true); void setContext('gitlens:views:canCompare:file', true);
} }
@debug()
@log()
private async openAllChanges(node: CommitNode | StashNode | ResultsFilesNode, options?: TextDocumentShowOptions) { private async openAllChanges(node: CommitNode | StashNode | ResultsFilesNode, options?: TextDocumentShowOptions) {
if (!(node instanceof CommitNode) && !(node instanceof StashNode) && !(node instanceof ResultsFilesNode)) { if (!(node instanceof CommitNode) && !(node instanceof StashNode) && !(node instanceof ResultsFilesNode)) {
return undefined; return undefined;
@ -1056,7 +1078,7 @@ export class ViewCommands {
return CommitActions.openAllChanges(node.commit, options); return CommitActions.openAllChanges(node.commit, options);
} }
@debug()
@log()
private openChanges(node: ViewRefFileNode | MergeConflictFileNode | StatusFileNode) { private openChanges(node: ViewRefFileNode | MergeConflictFileNode | StatusFileNode) {
if ( if (
!(node instanceof ViewRefFileNode) && !(node instanceof ViewRefFileNode) &&
@ -1114,7 +1136,7 @@ export class ViewCommands {
// }); // });
} }
@debug()
@log()
private async openAllChangesWithWorking( private async openAllChangesWithWorking(
node: CommitNode | StashNode | ResultsFilesNode, node: CommitNode | StashNode | ResultsFilesNode,
options?: TextDocumentShowOptions, options?: TextDocumentShowOptions,
@ -1179,7 +1201,7 @@ export class ViewCommands {
// } // }
} }
@debug()
@log()
private async openChangesWithWorking(node: ViewRefFileNode | MergeConflictFileNode | StatusFileNode) { private async openChangesWithWorking(node: ViewRefFileNode | MergeConflictFileNode | StatusFileNode) {
if ( if (
!(node instanceof ViewRefFileNode) && !(node instanceof ViewRefFileNode) &&
@ -1224,7 +1246,7 @@ export class ViewCommands {
}); });
} }
@debug()
@log()
private async openPreviousChangesWithWorking(node: ViewRefFileNode) { private async openPreviousChangesWithWorking(node: ViewRefFileNode) {
if (!(node instanceof ViewRefFileNode)) return Promise.resolve(); if (!(node instanceof ViewRefFileNode)) return Promise.resolve();
@ -1234,7 +1256,7 @@ export class ViewCommands {
}); });
} }
@debug()
@log()
private openFile( private openFile(
node: ViewRefFileNode | MergeConflictFileNode | StatusFileNode | FileHistoryNode | LineHistoryNode, node: ViewRefFileNode | MergeConflictFileNode | StatusFileNode | FileHistoryNode | LineHistoryNode,
options?: TextDocumentShowOptions, options?: TextDocumentShowOptions,
@ -1256,7 +1278,7 @@ export class ViewCommands {
}); });
} }
@debug()
@log()
private async openFiles(node: CommitNode | StashNode | ResultsFilesNode) { private async openFiles(node: CommitNode | StashNode | ResultsFilesNode) {
if (!(node instanceof CommitNode) && !(node instanceof StashNode) && !(node instanceof ResultsFilesNode)) { if (!(node instanceof CommitNode) && !(node instanceof StashNode) && !(node instanceof ResultsFilesNode)) {
return undefined; return undefined;
@ -1272,7 +1294,7 @@ export class ViewCommands {
return CommitActions.openFiles(node.commit); return CommitActions.openFiles(node.commit);
} }
@debug()
@log()
private async openRevision( private async openRevision(
node: node:
| CommitFileNode | CommitFileNode
@ -1315,7 +1337,7 @@ export class ViewCommands {
return CommitActions.openFileAtRevision(uri, options.showOptions ?? { preserveFocus: true, preview: false }); return CommitActions.openFileAtRevision(uri, options.showOptions ?? { preserveFocus: true, preview: false });
} }
@debug()
@log()
private async openRevisions(node: CommitNode | StashNode | ResultsFilesNode, _options?: TextDocumentShowOptions) { private async openRevisions(node: CommitNode | StashNode | ResultsFilesNode, _options?: TextDocumentShowOptions) {
if (!(node instanceof CommitNode) && !(node instanceof StashNode) && !(node instanceof ResultsFilesNode)) { if (!(node instanceof CommitNode) && !(node instanceof StashNode) && !(node instanceof ResultsFilesNode)) {
return undefined; return undefined;
@ -1331,7 +1353,7 @@ export class ViewCommands {
return CommitActions.openFilesAtRevision(node.commit); return CommitActions.openFilesAtRevision(node.commit);
} }
@debug()
@log()
private async setResultsCommitsFilter(node: ViewNode, filter: boolean) { private async setResultsCommitsFilter(node: ViewNode, filter: boolean) {
if (!node?.is('compare-results') && !node?.is('compare-branch')) return; if (!node?.is('compare-results') && !node?.is('compare-branch')) return;

Loading…
Cancel
Save