remove superfluous git command
authoralexlamsl <alexlamsl@gmail.com>
Sun, 14 Feb 2016 04:18:12 +0000 (12:18 +0800)
committeralexlamsl <alexlamsl@gmail.com>
Sun, 14 Feb 2016 04:18:12 +0000 (12:18 +0800)
backtest.js

index 2965554..e1fd9cb 100644 (file)
@@ -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();
     });
   });
 }