git: better scoped git behaviour

This commit is contained in:
Joao Moreno
2017-02-16 16:27:55 +01:00
parent 6d69f69c71
commit c894486977
3 changed files with 26 additions and 26 deletions

View File

@@ -41,8 +41,7 @@ async function init(disposables: Disposable[]): Promise<void> {
const pathHint = workspace.getConfiguration('git').get<string>('path');
const info = await findGit(pathHint);
const git = new Git({ gitPath: info.path, version: info.version });
const repository = git.open(rootPath);
const model = new Model(repository, onWorkspaceChange);
const model = new Model(git, rootPath, onWorkspaceChange);
outputChannel.appendLine(localize('using git', "Using git {0} from {1}", info.version, info.path));
git.onOutput(str => outputChannel.append(str), null, disposables);