extensions/git/src/watch.ts/watch
export function watch(location: string): IFileWatcher {
	const dotGitWatcher = fs.watch(location);
	const onDotGitFileChangeEmitter = new EventEmitter<Uri>();
	dotGitWatcher.on('change', (_, e) => onDotGitFileChangeEmitter.fire(Uri.file(join(location, e as string))));
	dotGitWatcher.on('error', err => console.error(err));

	return new class implements IFileWatcher {
		event = onDotGitFileChangeEmitter.event;
		dispose() { dotGitWatcher.close(); }
	};
}