title: Running child_process.exec fails on travis, not locally
body: <p>I'm running a command on travis to calculate the branch point from master of my current branch under test (guaranteed to not be master).</p>
  
  <p>Running this command:</p>
  
  <pre><code>function execute(cmd, cb) {
    exec(cmd, function (err, stdout, stderr) {
      if(err) {
        console.error('err', err);
      }
  
      if(stderr) {
        console.error('err', err);
      }
  
      cb(stdout.split('\n').join(''));
    });
  }
  
  execute('git rev-parse --short HEAD', cb)
  </code></pre>
  
  <p>runs, and returns me the short sha of my current branch just fine on Travis.</p>
  
  <p>When I run</p>
  
  <pre><code>var command = "bash -c 'diff -u &lt;(git rev-list --all bf2a1b7b7cf97f5df0618830f63d535db1a5dca6) "+
  "&lt;(git rev-list --first-parent master)' "+
  "| sed -ne 's/^ //p' | head -1";
  
  execute(command, cb);
  </code></pre>
  
  <p>This returns me exactly what I want locally, but on travis causes an error.
  I don't get anything valuable from the console.error's in the execute command, simply: <code>err null</code>.</p>
  
  <p>Since this works locally, even in a detached HEAD just like travis causes, my guess is that it is something to do with the environment. <strong>What is the version of git running on Travis?</strong></p>
  
  <p>Is there anything you can think of that would cause this to not work? Is bash not available? The main difference between this and the other git commands that do work is the <code>bash -c</code> part, and the process substitution.</p>
  
  <p>You can see the build page here <a href="https://travis-ci.org/VisualTesting/test-example/builds/54427942" rel="nofollow">https://travis-ci.org/VisualTesting/test-example/builds/54427942</a></p>