extensions/git/src/git.ts/findGit
export async function findGit(hint: string | string[] | undefined, onLookup: (path: string) => void): Promise<IGit> {
	const hints = Array.isArray(hint) ? hint : hint ? [hint] : [];

	for (const hint of hints) {
		try {
			return await findSpecificGit(hint, onLookup);
		} catch {
			// noop
		}
	}

	try {
		switch (process.platform) {
			case 'darwin': return await findGitDarwin(onLookup);
			case 'win32': return await findGitWin32(onLookup);
			default: return await findSpecificGit('git', onLookup);
		}
	} catch {
		// noop
	}

	throw new Error('Git installation not found.');
}