code: func commitIndex(commits []*gitpb.Commit, revision string) int {
  	for i, commit := range commits {
  		if commit.Id == revision {
  			return i
  		}
  	}
  	return -1
  }
docs: // commitIndex finds the index of the given revision inside the list of
  // Git commits, or -1 if the revision is not found.