Skip to content

Commit b6091ac

Browse files
authored
Detect git setting disabled (#8006)
Fixes #5454
1 parent a6a1b4f commit b6091ac

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1839,9 +1839,14 @@
18391839
},
18401840
{
18411841
"view": "pr:github",
1842-
"when": "gitNotInstalled",
1842+
"when": "gitNotInstalled && config.git.enabled != false",
18431843
"contents": "%welcome.github.noGit.contents%"
18441844
},
1845+
{
1846+
"view": "pr:github",
1847+
"when": "gitNotInstalled && config.git.enabled == false",
1848+
"contents": "%welcome.github.noGitDisabled.contents%"
1849+
},
18451850
{
18461851
"view": "github:login",
18471852
"when": "ReposManagerStateContext == NeedsAuthentication && !github:hasGitHubRemotes && gitOpenRepositoryCount",

package.nls.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,14 @@
345345
"{Locked='](command:pr.signin)'}"
346346
]
347347
},
348-
"welcome.github.noGit.contents": "Git is not installed or otherwise not available. Install git or fix your git installation and then reload.",
348+
"welcome.github.noGit.contents": "Git is not installed or otherwise not available. Install git or fix your git installation and then reload. If you have just enabled git in your settings, reload to continue.",
349+
"welcome.github.noGitDisabled.contents": {
350+
"message": "Git has been disabled in your settings. Enable git then reload.\n[Enable Git](command:workbench.action.openSettings?%5B%22git.enabled%22%5D)",
351+
"comment": [
352+
"Do not translate what's inside of (...). It is link syntax.",
353+
"{Locked='](command:workbench.action.openSettings?%5B%22git.enabled%22%5D)'}"
354+
]
355+
},
349356
"welcome.github.loginNoEnterprise.contents": {
350357
"message": "You have not yet signed in with GitHub\n[Sign in](command:pr.signinNoEnterprise)",
351358
"comment": [

0 commit comments

Comments
 (0)