src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.ts/TextModelDiffs/update
class TextModelDiffs:	private async update(initializing: boolean = false): Promise<void> {
		this.updateCount++;
		const currentUpdateCount = this.updateCount;

		if (this._state.get() === TextModelDiffState.initializing) {
			initializing = true;
		}

		transaction(tx => {
			this._state.set(
				initializing ? TextModelDiffState.initializing : TextModelDiffState.updating,
				tx,
				TextModelDiffChangeReason.other
			);
		});

		const result = await this.diffComputer.computeDiff(this.baseTextModel, this.textModel);
		if (this.isDisposed) {
			return;
		}

		if (currentUpdateCount !== this.updateCount) {
			// There is a newer update call
			return;
		}

		transaction(tx => {
			if (result.diffs) {
				this._state.set(TextModelDiffState.upToDate, tx, TextModelDiffChangeReason.textChange);
				this._diffs.set(result.diffs, tx, TextModelDiffChangeReason.textChange);
			} else {
				this._state.set(TextModelDiffState.error, tx, TextModelDiffChangeReason.textChange);
			}
		});
	}