From 2cccaaee8a88e96c36da64ab191a36b15e700dae Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Fri, 9 Jun 2023 00:19:10 +0200 Subject: [PATCH] Git - Close Repository command should be disabled when there is only one repository opened (#184637) --- extensions/git/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 1ac07ba7120..d9b3742db70 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -88,7 +88,7 @@ "command": "git.close", "title": "%command.close%", "category": "Git", - "enablement": "!operationInProgress" + "enablement": "!operationInProgress && gitOpenRepositoryCount > 1" }, { "command": "git.refresh", @@ -773,7 +773,7 @@ }, { "command": "git.close", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount > 1" }, { "command": "git.refresh",