🐛 getCommitTemplate throws in non-git repo

This commit is contained in:
Joao Moreno
2017-03-30 21:46:28 +02:00
parent b32988a1fd
commit 817174b971
2 changed files with 11 additions and 5 deletions

View File

@@ -45,14 +45,13 @@ async function init(context: ExtensionContext, disposables: Disposable[]): Promi
}
const model = new Model(git, workspaceRootPath);
const commitTemplate = await model.getCommitTemplate();
outputChannel.appendLine(localize('using git', "Using git {0} from {1}", info.version, info.path));
git.onOutput(str => outputChannel.append(str), null, disposables);
const commandCenter = new CommandCenter(git, model, outputChannel, telemetryReporter);
const statusBarCommands = new StatusBarCommands(model);
const provider = new GitSCMProvider(model, commandCenter, statusBarCommands, commitTemplate);
const provider = new GitSCMProvider(model, commandCenter, statusBarCommands);
const contentProvider = new GitContentProvider(model);
const autoFetcher = new AutoFetcher(model);
const mergeDecorator = new MergeDecorator(model);