<commit_before>//maintainRepo ensures our repo is being maintained and is updated
exports.maintainRepo = function (dir,url,callback) {
	var exec = require('child_process').exec;
	//Ensure git is installed
	var child = exec('command -v git',function(error,stdout,stderr) {
		if(error) {
			console.error('GIT IS NOT INSTALLED');
			process.exit(1);
		}
	});

	//File system maintenence
	var fs = require('fs');
	try {
		fs.mkdirSync(dir);
	} catch(error) {
		if(!error.code=='EEXIST') {
			console.error('Could not access ~/.cfi: '+error.message);
		}
	}
	
	//TODO: Handle errors for git. May not have permission for the specified directory
	var child = exec('git init '+dir, function(error, stdout,stderr) {
		var child = exec('git -C "'+dir+'" remote add origin '+url,function(error,stdout,stderr) {
			var child = exec('git -C "'+dir+'" reset --hard && git -C "'+dir+'" pull origin master',function(error,stdout,stderr) {
				if(!execResult(error,stdout,stderr)) {<commit_msg>Git -C issue should be fixed. Replaced -C with --git-dir and --work-tree<commit_after>//maintainRepo ensures our repo is being maintained and is updated
exports.maintainRepo = function (dir,url,callback) {
	var exec = require('child_process').exec;
	//Ensure git is installed
	var child = exec('command -v git',function(error,stdout,stderr) {
		if(error) {
			console.error('GIT IS NOT INSTALLED');
			process.exit(1);
		}
	});

	//File system maintenence
	var fs = require('fs');
	try {
		fs.mkdirSync(dir);
	} catch(error) {
		if(!error.code=='EEXIST') {
			console.error('Could not access ~/.cfi: '+error.message);
		}
	}
	
	//TODO: Handle errors for git. May not have permission for the specified directory
	var child = exec('git init '+dir, function(error, stdout,stderr) {
		var child = exec('git -C "'+dir+'" remote add origin '+url,function(error,stdout,stderr) {
			var child = exec('git --git-dir="'+dir+'/.git" --work-tree="'+dir+'" reset --hard && git --git-dir="'+dir+'/.git" --work-tree="'+dir+'" pull origin master',function(error,stdout,stderr) {
				if(!execResult(error,stdout,stderr)) {
{'fraction_non_alphanumeric': 0.17042726836293806, 'fraction_numerical': 0.0009601536245799327, 'mean_word_length': 4.329923273657289, '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': '1572922', 'n_tokens_mistral': 736, 'n_tokens_neox': 687, 'n_words': 189}