extensions/git/src/commands.ts/CommandCenter/acceptMerge
class CommandCenter:	async acceptMerge(uri: Uri | unknown): Promise<void> {
		if (!(uri instanceof Uri)) {
			return;
		}
		const repository = this.model.getRepository(uri);
		if (!repository) {
			console.log(`FAILED to accept merge because uri ${uri.toString()} doesn't belong to any repository`);
			return;
		}

		const doc = workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString());
		if (!doc) {
			console.log(`FAILED to accept merge because uri ${uri.toString()} doesn't match a document`);
			return;
		}

		await doc.save();

		// TODO@jrieken there isn't a `TabInputTextMerge` instance yet, till now the merge editor
		// uses the `TabInputText` for the out-resource and we use that to identify and CLOSE the tab
		// see https://github.com/microsoft/vscode/issues/153213
		const { activeTab } = window.tabGroups.activeTabGroup;
		let didCloseTab = false;
		if (activeTab && activeTab?.input instanceof TabInputText && activeTab.input.uri.toString() === uri.toString()) {
			didCloseTab = await window.tabGroups.close(activeTab, true);
		}

		// Only stage if the merge editor has been successfully closed. That means all conflicts have been
		// handled or unhandled conflicts are OK by the user.
		if (didCloseTab) {
			await repository.add([uri]);
			await commands.executeCommand('workbench.view.scm');
		}
	}