git: commit

This commit is contained in:
Joao Moreno
2017-01-31 11:15:52 +01:00
parent b276b5e04b
commit cb36e6c217
8 changed files with 126 additions and 35 deletions

View File

@@ -15,7 +15,7 @@ import { filterEvent, anyEvent } from './util';
import { GitContentProvider } from './contentProvider';
import { AutoFetcher } from './autofetch';
import { MergeDecorator } from './merge';
import { CommitHandler } from './commit';
import { CommitController } from './commit';
import * as nls from 'vscode-nls';
const localize = nls.config()();
@@ -42,16 +42,17 @@ async function init(disposables: Disposable[]): Promise<void> {
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(model, outputChannel);
const commitHandler = new CommitController(model);
const commandCenter = new CommandCenter(model, commitHandler, outputChannel);
const provider = new GitSCMProvider(model, commandCenter);
const contentProvider = new GitContentProvider(git, rootPath, onGitChange);
const checkoutStatusBar = new CheckoutStatusBar(model);
const syncStatusBar = new SyncStatusBar(model);
const autoFetcher = new AutoFetcher(model);
const mergeDecorator = new MergeDecorator(model);
const commitHandler = new CommitHandler(model);
disposables.push(
commitHandler,
commandCenter,
provider,
contentProvider,
@@ -60,8 +61,7 @@ async function init(disposables: Disposable[]): Promise<void> {
checkoutStatusBar,
syncStatusBar,
autoFetcher,
mergeDecorator,
commitHandler
mergeDecorator
);
}