<commit_before>/*
 * grunt-unison
 * https://github.com/amsross/grunt-unison
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

	grunt.registerTask('unison', 'runs unison to keep hosts in sync', function() {
		var options = this.options({
				verbose: false,
				args: [],
				src: false,
				dest: false,
			}),
			done = this.async(),
			verbose = options.verbose,
			args = options.args.concat([
				'-auto',
				'-batch',
				'-confirmbigdel=false',
				'-times',
			]),
			src = options.src,
			dest = options.dest
			;

		if (!src || !dest) {
			grunt.log.error('Both source and destination must be specified.');
			return false;
		} else {
			grunt.util.spawn({
				args: [src, dest].concat(args),
				cmd: 'unison',
				opts: {
					stdio: verbose ? [
						process.stdin,
						process.stout,
						process.stderr
					] : []
				}
			}, function(error, result, code) {
				if (error) {
					grunt.log.error(error);
					done(false);
					return false;
				}
				if(code === 127) {
					grunt.log.error('Synchronization failed. Please consult unison log. (1)');
					done(false);
					return false;
				}
				if (result) {
					var slice_index = result.stderr.search(/Synchronization complete at|Nothing to do/);
					if (slice_index > -1 || verbose) {
						grunt.log.ok(verbose ? result.stdout : result.stderr.slice(slice_index));
						done();
						return true;
					} else {
						grunt.log.error('Synchronization failed. Please consult unison log. (2)');
						done(false);
						return false;
					}
				}
			});
		}
	});
};
<commit_msg>Remove response comment<commit_after>/*
 * grunt-unison
 * https://github.com/amsross/grunt-unison
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

	grunt.registerTask('unison', 'runs unison to keep hosts in sync', function() {
		var options = this.options({
				verbose: false,
				args: [],
				src: false,
				dest: false,
			}),
			done = this.async(),
			verbose = options.verbose,
			args = options.args.concat([
				'-auto',
				'-batch',
				'-confirmbigdel=false',
				'-times',
			]),
			src = options.src,
			dest = options.dest
			;

		if (!src || !dest) {
			grunt.log.error('Both source and destination must be specified.');
			return false;
		} else {
			grunt.util.spawn({
				args: [src, dest].concat(args),
				cmd: 'unison',
				opts: {
					stdio: verbose ? [
						process.stdin,
						process.stout,
						process.stderr
					] : []
				}
			}, function(error, result, code) {
				if (error) {
					grunt.log.error(error);
					done(false);
					return false;
				}
				if(code === 127) {
					grunt.log.error('Synchronization failed. Please consult unison log.');
					done(false);
					return false;
				}
				if (result) {
					var slice_index = result.stderr.search(/Synchronization complete at|Nothing to do/);
					if (slice_index > -1 || verbose) {
						grunt.log.ok(verbose ? result.stdout : result.stderr.slice(slice_index));
						done();
						return true;
					} else {
						grunt.log.error('Synchronization failed. Please consult unison log.');
						done(false);
						return false;
					}
				}
			});
		}
	});
};

{'fraction_non_alphanumeric': 0.15498154981549817, 'fraction_numerical': 0.005535055350553505, 'mean_word_length': 2.42781875658588, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '7508966', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1078, 'n_words': 250}