src/vs/platform/userDataSync/common/tasksSync.ts/merge
function merge(originalLocalContent: string | null, originalRemoteContent: string | null, baseContent: string | null): {
	content: string | null;
	hasLocalChanged: boolean;
	hasRemoteChanged: boolean;
	hasConflicts: boolean;
} {

	/* no changes */
	if (originalLocalContent === null && originalRemoteContent === null && baseContent === null) {
		return { content: null, hasLocalChanged: false, hasRemoteChanged: false, hasConflicts: false };
	}

	/* no changes */
	if (originalLocalContent === originalRemoteContent) {
		return { content: null, hasLocalChanged: false, hasRemoteChanged: false, hasConflicts: false };
	}

	const localForwarded = baseContent !== originalLocalContent;
	const remoteForwarded = baseContent !== originalRemoteContent;

	/* no changes */
	if (!localForwarded && !remoteForwarded) {
		return { content: null, hasLocalChanged: false, hasRemoteChanged: false, hasConflicts: false };
	}

	/* local has changed and remote has not */
	if (localForwarded && !remoteForwarded) {
		return { content: originalLocalContent, hasRemoteChanged: true, hasLocalChanged: false, hasConflicts: false };
	}

	/* remote has changed and local has not */
	if (remoteForwarded && !localForwarded) {
		return { content: originalRemoteContent, hasLocalChanged: true, hasRemoteChanged: false, hasConflicts: false };
	}

	return { content: originalLocalContent, hasLocalChanged: true, hasRemoteChanged: true, hasConflicts: true };
}