wip: git extension typings

This commit is contained in:
Joao Moreno
2016-10-12 16:37:06 +02:00
parent b0f6ebc0fa
commit 277c0a253a
12 changed files with 23277 additions and 67 deletions

View File

@@ -5,11 +5,26 @@
'use strict';
import { scm, ExtensionContext } from 'vscode';
import { findGit } from './git';
import { scm, ExtensionContext, workspace } from 'vscode';
export function log(...args: any[]): void {
console.log.apply(console, ['git:', ...args]);
}
export function activate(context: ExtensionContext): any {
const provider = scm.createSCMProvider('git', null);
context.subscriptions.push(provider);
const pathHint = workspace.getConfiguration('git').get<string>('path');
console.log(provider);
findGit(pathHint).then(info => {
log(`Using git ${info.version} from ${info.path}`);
const provider = scm.createSCMProvider('git', {
// getOriginalResource: uri => {
// return uri;
// }
});
context.subscriptions.push(provider);
// return new Git({ gitPath: info.path, version: info.version });
});
}