<commit_before>var fs = require('fs');
var gitane = require('gitane');
var path = require('path');


module.exports = function(name, options, callback){
  // Read private key from ~/.ssh/id_rsa
  var keyFile = options.keyFile || '.ssh/id_rsa';
  var privKey = fs.readFileSync(path.join(process.env.HOME, keyFile), 'utf8');
  var baseDir = options.baseDir || process.cwd();
  var repoPath = baseDir + '/' + name;
  fs.mkdirSync(repoPath);
  if(options.readme){
    fs.writeFileSync(repoPath + '/README.md', options.readme);
  }
  if(options.license){
    fs.writeFileSync(repoPath + '/LICENSE', options.license);
  }

  gitane.run(baseDir, privKey, 'git add -A', function(err, stdout, stderr){
    if(err){
      callback(err);
    } else{
      gitane.run(baseDir, privKey, 'git commit -a -m "initial commit"', function(err, stdout, stderr){
        if(err){
          callback(err);
        } else{
          gitane.run(baseDir, privKey, 'git remote add origin ' + options.remote, function(err, stdout, stderr){
            if(err){
              callback(err);
            } else{
              gitane.run(baseDir, privKey, 'git push origin master', function(err, stderr, stdout){
                if(err){
                  callback(err);
                } else{
                  callback(undefined);
                }
              });
            }
          });
        }
      });
    }
  });
};<commit_msg>initial commit<commit_after>var fs = require('fs');
var gitane = require('gitane');
var path = require('path');


module.exports = function(name, options, callback){
  // Read private key from ~/.ssh/id_rsa
  var keyFile = options.keyFile || '.ssh/id_rsa';
  var privKey = fs.readFileSync(path.join(process.env.HOME, keyFile), 'utf8');
  var baseDir = options.baseDir || process.cwd();
  var repoPath = baseDir + '/' + name;
  fs.mkdirSync(repoPath);
  if(options.readme){
    fs.writeFileSync(repoPath + '/README.md', options.readme);
  }
  if(options.license){
    fs.writeFileSync(repoPath + '/LICENSE', options.license);
  }

  gitane.run(baseDir, privKey, 'git add -A', function(err, stdout, stderr){
    if(err){
      callback(err);
    } else{
      gitane.run(baseDir, privKey, 'git commit -a -m "initial commit"', function(err, stdout, stderr){
        if(err){
          callback(err);
        } else{
          gitane.run(baseDir, privKey, 'git remote add origin ' + options.remote, function(err, stdout, stderr){
            if(err){
              callback(err);
            } else{
              gitane.run(baseDir, privKey, 'git push -u origin master', function(err, stderr, stdout){
                if(err){
                  callback(err);
                } else{
                  callback(undefined);
                }
              });
            }
          });
        }
      });
    }
  });
};
{'fraction_non_alphanumeric': 0.15218926553672316, 'fraction_numerical': 0.0007062146892655367, 'mean_word_length': 2.190315315315315, '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': '5224868', 'n_tokens_mistral': 904, 'n_tokens_neox': 883, 'n_words': 192}