From a62d76ebe8f51636b959578a434a981a1167dbe5 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 31 Aug 2023 01:04:36 -0400 Subject: [PATCH] Fixes missing context menu commands on branches --- package.json | 65 ++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index ffb9103..6ffe4bd 100644 --- a/package.json +++ b/package.json @@ -11555,29 +11555,49 @@ "group": "1_gitlens_actions@1" }, { + "command": "gitlens.views.publishBranch", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+remote\\b)(?!.*?\\b\\+tracking\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@2" + }, + { + "command": "gitlens.views.push", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+ahead\\b)(?!.*?\\b\\+behind\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@2" + }, + { + "command": "gitlens.views.pull", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+behind\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@2" + }, + { + "command": "gitlens.views.fetch", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(remote|tracking)\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@3" + }, + { "command": "gitlens.views.mergeBranchInto", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)(?!.*?\\b\\+closed\\b)/", - "group": "1_gitlens_actions@3" + "group": "1_gitlens_actions@4" }, { "command": "gitlens.views.rebaseOntoBranch", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)(?!.*?\\b\\+closed\\b)/", - "group": "1_gitlens_actions@4" + "group": "1_gitlens_actions@5" }, { "command": "gitlens.views.rebaseOntoUpstream", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+current\\b)(?=.*?\\b\\+tracking\\b)(?!.*?\\b\\+closed\\b)/", - "group": "1_gitlens_actions@4" + "group": "1_gitlens_actions@5" }, { "command": "gitlens.views.renameBranch", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+closed\\b)/", - "group": "1_gitlens_actions@5" + "group": "1_gitlens_actions@6" }, { "command": "gitlens.views.deleteBranch", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)(?!.*?\\b\\+closed\\b)/", - "group": "1_gitlens_actions@6" + "group": "1_gitlens_actions@7" }, { "command": "gitlens.views.createBranch", @@ -12813,29 +12833,49 @@ "group": "1_gitlens_actions@1" }, { + "command": "gitlens.graph.publishBranch", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?!.*?\\b\\+remote\\b)(?!.*?\\b\\+tracking\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@2" + }, + { + "command": "gitlens.graph.push", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+ahead\\b)(?!.*?\\b\\+behind\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@2" + }, + { + "command": "gitlens.graph.pull", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+behind\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@2" + }, + { + "command": "gitlens.graph.fetch", + "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(remote|tracking)\\b)(?!.*?\\b\\+closed\\b)/", + "group": "1_gitlens_actions@3" + }, + { "command": "gitlens.graph.mergeBranchInto", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)/", - "group": "1_gitlens_actions@3" + "group": "1_gitlens_actions@4" }, { "command": "gitlens.graph.rebaseOntoBranch", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)/", - "group": "1_gitlens_actions@4" + "group": "1_gitlens_actions@5" }, { "command": "gitlens.graph.rebaseOntoUpstream", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?=.*?\\b\\+current\\b)(?=.*?\\b\\+tracking\\b)/", - "group": "1_gitlens_actions@4" + "group": "1_gitlens_actions@5" }, { "command": "gitlens.graph.renameBranch", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b/", - "group": "1_gitlens_actions@5" + "group": "1_gitlens_actions@6" }, { "command": "gitlens.graph.deleteBranch", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)/", - "group": "1_gitlens_actions@6" + "group": "1_gitlens_actions@7" }, { "command": "gitlens.graph.createBranch", @@ -12884,11 +12924,6 @@ "alt": "gitlens.copyRemoteBranchUrl" }, { - "command": "gitlens.graph.publishBranch", - "when": "gitlens:hasRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:branch\\b(?!.*?\\b\\+remote\\b)(?!.*?\\b\\+tracking\\b)/", - "group": "8_gitlens_actions@13" - }, - { "command": "gitlens.graph.cherryPick", "when": "!gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders && webviewItem =~ /gitlens:commit\\b(?!.*?\\b\\+current\\b)/", "group": "1_gitlens_actions@1"