code: func (p KeepOnlyLastCommitDeletionPolicy) onCommit(commits []IndexCommit) error {
  	// Note that len(commits) should normally be 2 (if not called by
  	// onInit above).
  	for i, limit := 0, len(commits); i < limit-1; i++ {
  		commits[i].Delete()
  	}
  	return nil
  }
docs: // Deletes all commits except the most recent one.