extensions/git/src/git.ts/parseGitRemotes
export function parseGitRemotes(raw: string): Remote[] {
	const remotes: Remote[] = [];

	for (const remoteSection of GitConfigParser.parse(raw).filter(s => s.name === 'remote')) {
		if (remoteSection.subSectionName) {
			remotes.push({
				name: remoteSection.subSectionName,
				fetchUrl: remoteSection.properties['url'],
				pushUrl: remoteSection.properties['pushurl'] ?? remoteSection.properties['url'],
				// https://github.com/microsoft/vscode/issues/45271
				isReadOnly: remoteSection.properties['pushurl'] === 'no_push'
			});
		}
	}

	return remotes;
}