<commit_before>var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res) {
  spawn('git', ['pull']);
  child.kill();
  startApp();
  res.send('ok.');
});

function startApp()
{
    child = spawn('node', ['app.js']);
    child.stdout.setEncoding('utf8');
    child.stdout.on('data', function (data) {
        var str = data.toString()
        console.log(str);
    });
    child.on('close', function (code) {
        console.log('process exit code ' + code);
    });
}
<commit_msg>just git pull and exit process, forever.<commit_after>var express = require('express');
var spawn = require('child_process').spawn;
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res) {
  var child = spawn('git', ['pull']);
  child.on('exit', function(code) {
    res.send('git pulled, restarting now.');
    process.exit(1);
  });
});

{'fraction_non_alphanumeric': 0.2077922077922078, 'fraction_numerical': 0.0021645021645021645, 'mean_word_length': 3.648241206030151, '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': '459700', 'n_tokens_mistral': 291, 'n_tokens_neox': 293, 'n_words': 69}