function gitToList (gitCmd, callback) { var child = spawn('bash', [ '-c', gitCmd ]) child.stdout.pipe(split2()).pipe(commitStream()).pipe(listStream.obj(callback)) }
function branchDiff (branch1, branch2, options, callback) { if (!branch1 || !branch2) { return callback(new Error('Must supply two branch names to compare')) } const repoPath = options.repoPath || process.cwd() findMergeBase(repoPath, branch1, branch2, (err, commit) => { if (err) { return callback(err) } map( [branch1, branch2], (branch, callback) => { collect(repoPath, branch, commit, branch === branch2 && options.endRef).pipe(listStream.obj(callback)) } , (err, branchCommits) => err ? callback(err) : diffCollected(options, branchCommits, callback) ) }) }