code: function compileHistory(resultingArrayOfCommits) {
    var lastSha;
    if (historyCommits.length > 0) {
      lastSha = historyCommits[historyCommits.length - 1].commit.sha();
      if (
        resultingArrayOfCommits.length == 1 &&
        resultingArrayOfCommits[0].commit.sha() == lastSha
      ) {
        return;
      }
    }
  
    resultingArrayOfCommits.forEach(function(entry) {
      historyCommits.push(entry);
    });
  
    lastSha = historyCommits[historyCommits.length - 1].commit.sha();
  
    walker = repo.createRevWalk();
    walker.push(lastSha);
    walker.sorting(nodegit.Revwalk.SORT.TIME);
  
    return walker.fileHistoryWalk(historyFile, 500)
      .then(compileHistory);
  }
docs: This code walks the history of the master branch and prints results that look very similar to calling `git log` from the command line