src/vs/workbench/contrib/scm/common/scmService.ts/SCMInput/migrateAndGarbageCollectStorage
class SCMInput:	private static migrateAndGarbageCollectStorage(storageService: IStorageService): void {
		if (SCMInput.didGarbageCollect) {
			return;
		}

		// Migrate from old format // TODO@joao: remove this migration code a few releases
		const userKeys = Iterable.filter(Iterable.from(storageService.keys(StorageScope.APPLICATION, StorageTarget.USER)), key => key.startsWith('scm/input:'));

		for (const key of userKeys) {
			try {
				const rawHistory = storageService.get(key, StorageScope.APPLICATION, '');
				const history = JSON.parse(rawHistory);

				if (Array.isArray(history)) {
					if (history.length === 0 || (history.length === 1 && history[0] === '')) {
						// remove empty histories
						storageService.remove(key, StorageScope.APPLICATION);
					} else {
						// migrate existing histories to have a timestamp
						storageService.store(key, JSON.stringify({ timestamp: new Date().getTime(), history }), StorageScope.APPLICATION, StorageTarget.MACHINE);
					}
				} else {
					// move to MACHINE target
					storageService.store(key, rawHistory, StorageScope.APPLICATION, StorageTarget.MACHINE);
				}
			} catch {
				// remove unparseable entries
				storageService.remove(key, StorageScope.APPLICATION);
			}
		}

		// Garbage collect
		const machineKeys = Iterable.filter(Iterable.from(storageService.keys(StorageScope.APPLICATION, StorageTarget.MACHINE)), key => key.startsWith('scm/input:'));

		for (const key of machineKeys) {
			try {
				const history = JSON.parse(storageService.get(key, StorageScope.APPLICATION, ''));

				if (Array.isArray(history?.history) && Number.isInteger(history?.timestamp) && new Date().getTime() - history?.timestamp > 2592000000) {
					// garbage collect after 30 days
					storageService.remove(key, StorageScope.APPLICATION);
				}
			} catch {
				// remove unparseable entries
				storageService.remove(key, StorageScope.APPLICATION);
			}
		}

		SCMInput.didGarbageCollect = true;
	}