src/vs/workbench/services/workingCopy/common/workingCopyHistoryTracker.ts/WorkingCopyHistoryTracker/shouldTrackHistory
class WorkingCopyHistoryTracker:	private shouldTrackHistory(resource: URI, stat: IFileStatWithMetadata): boolean {
		if (
			resource.scheme !== this.pathService.defaultUriScheme && 	// track history for all workspace resources
			resource.scheme !== Schemas.vscodeUserData					// track history for all settings
		) {
			return false; // do not support unknown resources
		}

		const configuredMaxFileSizeInBytes = 1024 * this.configurationService.getValue<number>(WorkingCopyHistoryTracker.SETTINGS.SIZE_LIMIT, { resource });
		if (stat.size > configuredMaxFileSizeInBytes) {
			return false; // only track files that are not too large
		}

		if (this.configurationService.getValue(WorkingCopyHistoryTracker.SETTINGS.ENABLED, { resource }) === false) {
			return false; // do not track when history is disabled
		}

		// Finally check for exclude setting
		return !this.resourceExcludeMatcher.value.matches(resource);
	}