Skip to content

Commit 54d8261

Browse files
committed
git: config.terminalAuthentication
1 parent bc9854b commit 54d8261

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

extensions/git/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,12 @@
16651665
"scope": "resource",
16661666
"default": true,
16671667
"description": "%config.showCommitInput%"
1668+
},
1669+
"git.terminalAuthentication": {
1670+
"type": "boolean",
1671+
"scope": "resource",
1672+
"default": true,
1673+
"description": "%config.terminalAuthentication%"
16681674
}
16691675
}
16701676
},

extensions/git/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
"config.untrackedChanges.separate": "Untracked changes appear separately in the Source Control view. They are also excluded from several actions.",
145145
"config.untrackedChanges.hidden": "Untracked changes are hidden and excluded from several actions.",
146146
"config.showCommitInput": "Controls whether to show the commit input in the Git source control panel.",
147+
"config.terminalAuthentication": "Controls whether to enable VS Code to be the authentication handler for git processes spawned in the integrated terminal.",
147148
"colors.added": "Color for added resources.",
148149
"colors.modified": "Color for modified resources.",
149150
"colors.deleted": "Color for deleted resources.",

extensions/git/src/ipc/ipcServer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export interface IIPCHandler {
2929

3030
export async function createIPCServer(context?: string): Promise<IIPCServer> {
3131
const server = http.createServer();
32-
3332
const hash = crypto.createHash('sha1');
3433

3534
if (!context) {

extensions/git/src/main.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import * as fs from 'fs';
2323
import { GitTimelineProvider } from './timelineProvider';
2424
import { registerAPICommands } from './api/api1';
2525
import { GitHubCredentialProvider } from './github';
26+
import { TerminalEnvironmentManager } from './terminal';
2627

2728
const deactivateTasks: { (): Promise<any>; }[] = [];
2829

@@ -40,10 +41,8 @@ async function createModel(context: ExtensionContext, outputChannel: OutputChann
4041
disposables.push(askpass);
4142

4243
const env = askpass.getEnv();
43-
44-
for (const name of Object.keys(env)) {
45-
context.environmentVariableCollection.replace(name, env[name]);
46-
}
44+
const terminalEnvironmentManager = new TerminalEnvironmentManager(context, env);
45+
disposables.push(terminalEnvironmentManager);
4746

4847
context.subscriptions.push(askpass.registerCredentialsProvider(new GitHubCredentialProvider()));
4948

0 commit comments

Comments
 (0)