mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
git: enabled config
This commit is contained in:
@@ -21,9 +21,16 @@ import * as nls from 'vscode-nls';
|
||||
const localize = nls.config()();
|
||||
|
||||
async function init(disposables: Disposable[]): Promise<void> {
|
||||
const outputChannel = window.createOutputChannel('Git');
|
||||
disposables.push(outputChannel);
|
||||
|
||||
const config = workspace.getConfiguration('git');
|
||||
const enabled = config.get<boolean>('enabled') === true;
|
||||
const rootPath = workspace.rootPath;
|
||||
|
||||
if (!rootPath) {
|
||||
if (!rootPath || !enabled) {
|
||||
const commandCenter = new CommandCenter(undefined, outputChannel);
|
||||
disposables.push(commandCenter);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -38,7 +45,6 @@ async function init(disposables: Disposable[]): Promise<void> {
|
||||
const repositoryRoot = await repository.getRoot();
|
||||
const model = new Model(repositoryRoot, repository, onWorkspaceChange);
|
||||
|
||||
const outputChannel = window.createOutputChannel('Git');
|
||||
outputChannel.appendLine(localize('using git', "Using git {0} from {1}", info.version, info.path));
|
||||
git.onOutput(str => outputChannel.append(str), null, disposables);
|
||||
|
||||
@@ -56,7 +62,6 @@ async function init(disposables: Disposable[]): Promise<void> {
|
||||
commandCenter,
|
||||
provider,
|
||||
contentProvider,
|
||||
outputChannel,
|
||||
fsWatcher,
|
||||
checkoutStatusBar,
|
||||
syncStatusBar,
|
||||
|
||||
Reference in New Issue
Block a user