From 4bacb6fbff45dd45940e9ff3d366170aa6c83237 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 4 Sep 2017 01:38:46 -0400 Subject: [PATCH] Hides remote menus if there are no remotes --- package.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 0f97b2c..a24bd7d 100644 --- a/package.json +++ b/package.json @@ -1341,12 +1341,12 @@ }, { "command": "gitlens.openFileInRemote", - "when": "gitlens:enabled && config.gitlens.advanced.menus.editorTitleContext.remote", + "when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.editorTitleContext.remote", "group": "1_gitlens" }, { "command": "gitlens.openRepoInRemote", - "when": "gitlens:enabled && config.gitlens.advanced.menus.editorTitleContext.remote", + "when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.editorTitleContext.remote", "group": "1_gitlens" }, { @@ -1378,7 +1378,7 @@ "editor/title/context": [ { "command": "gitlens.openFileInRemote", - "when": "gitlens:enabled && config.gitlens.advanced.menus.editorTitleContext.remote", + "when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.editorTitleContext.remote", "group": "1_gitlens" }, { @@ -1405,7 +1405,7 @@ "explorer/context": [ { "command": "gitlens.openFileInRemote", - "when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote", + "when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.explorerContext.remote", "group": "navigation@100" }, { @@ -1488,17 +1488,17 @@ "view/item/context": [ { "command": "gitlens.openBranchesInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:branches", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:branches", "group": "1_gitlens@1" }, { "command": "gitlens.openBranchInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:branch-history", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:branch-history", "group": "1_gitlens@1" }, { "command": "gitlens.openCommitInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:commit", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:commit", "group": "1_gitlens@1" }, { @@ -1548,12 +1548,12 @@ }, { "command": "gitlens.openFileInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:commit-file", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:commit-file", "group": "3_gitlens@1" }, { "command": "gitlens.gitExplorer.openFileRevisionInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:commit-file", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:commit-file", "group": "3_gitlens@2" }, { @@ -1578,17 +1578,17 @@ }, { "command": "gitlens.openFileInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:file-history", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:file-history", "group": "1_gitlens@2" }, { "command": "gitlens.openBranchesInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:remote", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:remote", "group": "1_gitlens@1" }, { "command": "gitlens.openRepoInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:remote", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:remote", "group": "1_gitlens@2" }, { @@ -1643,7 +1643,7 @@ }, { "command": "gitlens.openFileInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:stash-file", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:stash-file", "group": "3_gitlens@1" }, { @@ -1658,7 +1658,7 @@ }, { "command": "gitlens.openRepoInRemote", - "when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == gitlens:status", + "when": "gitlens:enabled && gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:status", "group": "1_gitlens@1" }, {