docs: function (allCommitItems) {
              var filteredCommits = [],
                  index,
                  hashToIndex = {},
                  reachabilityGraph = {},
                  extendReachability = function (original, extension) {
                      var key;
  
                      for (key in extension) {
                          original[key] = true;
                      }
                  },
                  i, j;
  
              for (i = 0; i < allCommitItems.length; i += 1) {
                  hashToIndex[allCommitItems[i][CONSTANTS.MONGO_ID]] = i;
              }
  
              //this is the function that fills out the rootHash...
              rootHash = allCommitItems[hashToIndex[toCommit]].root;
  
              for (i = 0; i < allCommitItems.length; i += 1) {
                  for (j = 0; j < allCommitItems[i].parents.length; j += 1) {
                      index = hashToIndex[allCommitItems[i].parents[j]];
                      reachabilityGraph[index] = reachabilityGraph[index] || {};
                      reachabilityGraph[index][i] = true;
                      extendReachability(reachabilityGraph[index], reachabilityGraph[i]);
  
                  }
              }
  
              for (index in reachabilityGraph[hashToIndex[fromCommit]]) {
                  filteredCommits.push(allCommitItems[index]);
              }
  
              return filteredCommits;
          }