code: func removeComp(path string, cs []*object.Commit, comp contentsComparatorFn) ([]*object.Commit, error) {
  	result := make([]*object.Commit, 0, len(cs))
  	if len(cs) == 0 {
  		return result, nil
  	}
  	result = append(result, cs[0])
  	for i := 1; i < len(cs); i++ {
  		equals, err := comp(path, cs[i], cs[i-1])
  		if err != nil {
  			return nil, err
  		}
  		if !equals {
  			result = append(result, cs[i])
  		}
  	}
  	return result, nil
  }
docs: // Returns a new slice of commits, with duplicates removed.  Expects a
  // sorted commit list.  Duplication is defined according to "comp".  It
  // will always keep the first commit of a series of duplicated commits.