Переглянути джерело

Removes follow renames from line history

main
Eric Amodio 4 роки тому
джерело
коміт
e8a45c3a93
3 змінених файлів з 6 додано та 48 видалено
  1. +4
    -32
      package.json
  2. +1
    -16
      src/views/lineHistoryView.ts
  3. +1
    -0
      src/views/nodes/lineHistoryNode.ts

+ 4
- 32
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"

+ 1
- 16
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
!configuration.changed(e, 'defaultDateFormat') &&
!configuration.changed(e, 'defaultDateSource') &&
!configuration.changed(e, 'defaultDateStyle') &&
!configuration.changed(e, 'defaultGravatarsStyle') &&
!configuration.changed(e, 'advanced', 'fileHistoryFollowsRenames')
!configuration.changed(e, 'defaultGravatarsStyle')
) {
return false;
}
@ -98,10 +87,6 @@ export class LineHistoryView extends ViewBase
}
}
private setRenameFollowing(enabled: boolean) {
return configuration.updateEffective('advanced', 'fileHistoryFollowsRenames', enabled);
}
private setShowAvatars(enabled: boolean) {
return configuration.updateEffective('views', this.configKey, 'avatars', enabled);
}

+ 1
- 0
src/views/nodes/lineHistoryNode.ts Переглянути файл

@ -292,6 +292,7 @@ export class LineHistoryNode extends SubscribeableViewNode implements PageableVi
limit: this.limit ?? this.view.config.defaultItemLimit,
ref: this.uri.sha,
range: selection ?? this.selection,
renames: false,
});
}

Завантаження…
Відмінити
Зберегти