From e8a45c3a930dc0aa953f3cd17b53b9f7e49b7fe2 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 23 Sep 2020 21:40:18 -0400 Subject: [PATCH] Removes follow renames from line history --- package.json | 36 ++++-------------------------------- src/views/lineHistoryView.ts | 17 +---------------- src/views/nodes/lineHistoryNode.ts | 1 + 3 files changed, 6 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index 202f259..62a4f4e 100644 --- a/package.json +++ b/package.json @@ -2082,7 +2082,7 @@ }, "gitlens.advanced.fileHistoryFollowsRenames": { "type": "boolean", - "default": true, + "default": false, "markdownDescription": "Specifies whether file histories will follow renames — will affect how merge commits are shown in histories", "scope": "window" }, @@ -3860,16 +3860,6 @@ "icon": "$(pin)" }, { - "command": "gitlens.views.lineHistory.setRenameFollowingOn", - "title": "Follow Renames", - "category": "GitLens" - }, - { - "command": "gitlens.views.lineHistory.setRenameFollowingOff", - "title": "Don't Follow Renames", - "category": "GitLens" - }, - { "command": "gitlens.views.lineHistory.setShowAvatarsOn", "title": "Show Avatars", "category": "GitLens" @@ -5093,14 +5083,6 @@ "when": "false" }, { - "command": "gitlens.views.lineHistory.setRenameFollowingOn", - "when": "false" - }, - { - "command": "gitlens.views.lineHistory.setRenameFollowingOff", - "when": "false" - }, - { "command": "gitlens.views.lineHistory.setShowAvatarsOn", "when": "false" }, @@ -5941,17 +5923,17 @@ }, { "command": "gitlens.views.fileHistory.setRenameFollowingOn", - "when": "view =~ /^gitlens\\.views\\.fileHistory/ && !config.gitlens.advanced.fileHistoryFollowsRenames && !config.gitlens.advanced.fileHistoryShowAllBranches", + "when": "view =~ /^gitlens\\.views\\.fileHistory/ && !gitlens:views:fileHistory:cursorFollowing && !config.gitlens.advanced.fileHistoryFollowsRenames && !config.gitlens.advanced.fileHistoryShowAllBranches", "group": "2_gitlens@0" }, { "command": "gitlens.views.fileHistory.setRenameFollowingOn", - "when": "view =~ /^gitlens\\.views\\.fileHistory/ && config.gitlens.advanced.fileHistoryShowAllBranches", + "when": "view =~ /^gitlens\\.views\\.fileHistory/ && !gitlens:views:fileHistory:cursorFollowing && config.gitlens.advanced.fileHistoryShowAllBranches", "group": "2_gitlens@0" }, { "command": "gitlens.views.fileHistory.setRenameFollowingOff", - "when": "view =~ /^gitlens\\.views\\.fileHistory/ && config.gitlens.advanced.fileHistoryFollowsRenames && !config.gitlens.advanced.fileHistoryShowAllBranches", + "when": "view =~ /^gitlens\\.views\\.fileHistory/ && !gitlens:views:fileHistory:cursorFollowing && config.gitlens.advanced.fileHistoryFollowsRenames && !config.gitlens.advanced.fileHistoryShowAllBranches", "group": "2_gitlens@0" }, { @@ -5995,16 +5977,6 @@ "group": "1_gitlens@0" }, { - "command": "gitlens.views.lineHistory.setRenameFollowingOn", - "when": "view =~ /^gitlens\\.views\\.lineHistory/ && !config.gitlens.advanced.fileHistoryFollowsRenames", - "group": "2_gitlens@0" - }, - { - "command": "gitlens.views.lineHistory.setRenameFollowingOff", - "when": "view =~ /^gitlens\\.views\\.lineHistory/ && config.gitlens.advanced.fileHistoryFollowsRenames", - "group": "2_gitlens@0" - }, - { "command": "gitlens.views.remotes.setLayoutToList", "when": "view =~ /gitlens\\.views\\.remotes/ && config.gitlens.views.remotes.branches.layout == tree", "group": "navigation@50" diff --git a/src/views/lineHistoryView.ts b/src/views/lineHistoryView.ts index e0dc720..c93ee77 100644 --- a/src/views/lineHistoryView.ts +++ b/src/views/lineHistoryView.ts @@ -40,16 +40,6 @@ export class LineHistoryView extends ViewBase this.setEditorFollowing(false), this, ); - commands.registerCommand( - this.getQualifiedCommand('setRenameFollowingOn'), - () => this.setRenameFollowing(true), - this, - ); - commands.registerCommand( - this.getQualifiedCommand('setRenameFollowingOff'), - () => this.setRenameFollowing(false), - this, - ); commands.registerCommand(this.getQualifiedCommand('setShowAvatarsOn'), () => this.setShowAvatars(true), this); commands.registerCommand(this.getQualifiedCommand('setShowAvatarsOff'), () => this.setShowAvatars(false), this); } @@ -61,8 +51,7 @@ export class LineHistoryView extends ViewBase