code: func (fd *IndexFileDeleter) deleteCommits() {
  	if size := len(fd.commitsToDelete); size > 0 {
  		// First decref all files that had been referred to by the
  		// now-deleted commits:
  		for _, commit := range fd.commitsToDelete {
  			if fd.infoStream.IsEnabled("IFD") {
  				fd.infoStream.Message("IFD", "deleteCommits: now decRef commit '%v'",
  					commit.segmentsFileName)
  			}
  			fd.decRefFiles(commit.files)
  		}
  		fd.commitsToDelete = nil
  
  		// Now compact commits to remove deleted ones (preserving the sort):
  		var writeTo = 0
  		for readFrom, commit := range fd.commits {
  			if !commit.IsDeleted() && readFrom != writeTo {
  				fd.commits[writeTo] = commit
  				writeTo++
  			}
  		}
  		for i, _ := range fd.commits[writeTo:] {
  			fd.commits[i] = nil
  		}
  		fd.commits = fd.commits[:writeTo]
  	}
  }
docs: /*
  Remove the CommitPoint(s) in the commitsToDelete list by decRef'ing
  all files from each SegmentInfos.
  */