From 8c65a004a7e812472d685f583826bf5f8a2410aa Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sun, 14 Feb 2016 12:18:12 +0800 Subject: [PATCH] remove superfluous git command --- backtest.js | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/backtest.js b/backtest.js index 2965554..e1fd9cb 100644 --- a/backtest.js +++ b/backtest.js @@ -147,33 +147,31 @@ else { process.on('message', function(hash) { var paths = ['src', 'benchmark.conf', 'sample-cli-config-file.conf']; git('reset', 'HEAD', '--', paths, function() { - git('clean', '-f', '-d', '--', paths, function() { - var conf = 'sample-cli-config-file.conf'; - - function checkout() { - var path = paths.shift(); - git('checkout', hash, '--', path, function(code) { - if (code === 0 && path === 'benchmark.conf') { - conf = path; - } - if (paths.length) { - checkout(); - } - else { - readText(conf, function(err, data) { - if (err) { - throw err; - } - else { - minify(hash, JSON.parse(data)); - } - }); - } - }); - } + var conf = 'sample-cli-config-file.conf'; - checkout(); - }); + function checkout() { + var path = paths.shift(); + git('checkout', hash, '--', path, function(code) { + if (code === 0 && path === 'benchmark.conf') { + conf = path; + } + if (paths.length) { + checkout(); + } + else { + readText(conf, function(err, data) { + if (err) { + throw err; + } + else { + minify(hash, JSON.parse(data)); + } + }); + } + }); + } + + checkout(); }); }); } -- 2.34.1