all files / src/git/ log.js

100% Statements 2/2
50% Branches 1/2
100% Functions 2/2
100% Lines 2/2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                 
import {exec} from 'child_process';
 
export { log };
 
/**
 * Asynchronously gets the git log output
 */
function log(repoPath, done) {
  exec('git log', {
    maxBuffer: Infinity,
    cwd: repoPath
  }, function(error, stdout, stderr) {
    Iif (error) {
      done();
    }
    done(stdout);
  });
}