<commit_before>/datum/getrev
	var/originmastercommit
	var/commit
	var/list/testmerge = list()
	var/date

/datum/getrev/New()
	testmerge = world.TgsTestMerges()
	log_world("Running /tg/ revision:")
	var/list/logs = world.file2list(".git/logs/HEAD")
	if(logs)
		logs = splittext(logs[logs.len - 1], " ")
		date = unix2date(text2num(logs[5]))
		commit = logs[2]
		log_world("[commit]: [date]")
	else
		log_world("Unable to read git logs, revision information not available")
		originmastercommit = commit = "Unknown"
		date = unix2date(world.timeofday)
		return
	logs = world.file2list(".git/logs/refs/remotes/origin/master")
	if(logs.len)
		originmastercommit = splittext(logs[logs.len - 1], " ")[2]

	if(testmerge.len)<commit_msg>Fix getrev when TGS is present (#39777)<commit_after>/datum/getrev
	var/originmastercommit
	var/commit
	var/list/testmerge = list()
	var/date

/datum/getrev/New()
	testmerge = world.TgsTestMerges()
	log_world("Running /tg/ revision:")
	var/datum/tgs_revision_information/revinfo = world.TgsRevision()
	if(revinfo)
		commit = revinfo.commit
		originmastercommit = revinfo.origin_commit
	else
		var/list/logs = world.file2list(".git/logs/HEAD")
		if(logs)
			logs = splittext(logs[logs.len - 1], " ")
			date = unix2date(text2num(logs[5]))
			commit = logs[2]
			log_world("[commit]: [date]")
		else
			log_world("Unable to read git logs, revision information not available")
			originmastercommit = commit = "Unknown"
			date = unix2date(world.timeofday)
			return
		logs = world.file2list(".git/logs/refs/remotes/origin/master")
		if(logs.len)
			originmastercommit = splittext(logs[logs.len - 1], " ")[2]

	if(testmerge.len)
{'fraction_non_alphanumeric': 0.1475211608222491, 'fraction_numerical': 0.015114873035066506, 'mean_word_length': 4.498338870431894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1990618', 'n_tokens_mistral': 651, 'n_tokens_neox': 603, 'n_words': 109}