From d0329cf3eb0275d57edd4c4cb5f28796d2af6ef2 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Tue, 28 Jul 2020 22:24:43 +0200 Subject: [PATCH] Adjust comments to match name of exported methods --- cmd/restic/delete.go | 2 +- internal/repository/index.go | 2 +- internal/repository/master_index.go | 2 +- internal/repository/repository.go | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/restic/delete.go b/cmd/restic/delete.go index 0d92f3375..6d7657e80 100644 --- a/cmd/restic/delete.go +++ b/cmd/restic/delete.go @@ -12,7 +12,7 @@ func DeleteFiles(gopts GlobalOptions, repo restic.Repository, fileList restic.ID deleteFiles(gopts, true, repo, fileList, fileType) } -// DeleteFiles deletes the given fileList of fileType in parallel +// DeleteFilesChecked deletes the given fileList of fileType in parallel // if an error occurs, it will cancel and return this error func DeleteFilesChecked(gopts GlobalOptions, repo restic.Repository, fileList restic.IDSet, fileType restic.FileType) error { return deleteFiles(gopts, false, repo, fileList, fileType) diff --git a/internal/repository/index.go b/internal/repository/index.go index ce0d1da82..4beecc008 100644 --- a/internal/repository/index.go +++ b/internal/repository/index.go @@ -394,7 +394,7 @@ func (idx *Index) Finalize() { idx.packIDToIndex = nil } -// ID returns the IDs of the index, if available. If the index is not yet +// IDs returns the IDs of the index, if available. If the index is not yet // finalized, an error is returned. func (idx *Index) IDs() (restic.IDs, error) { idx.m.Lock() diff --git a/internal/repository/master_index.go b/internal/repository/master_index.go index 318bf7c31..57b2985a6 100644 --- a/internal/repository/master_index.go +++ b/internal/repository/master_index.go @@ -134,7 +134,7 @@ func (mi *MasterIndex) Insert(idx *Index) { mi.idx = append(mi.idx, idx) } -// Store remembers the id and pack in the index. +// StorePack remembers the id and pack in the index. func (mi *MasterIndex) StorePack(id restic.ID, blobs []restic.Blob) { mi.idxMutex.Lock() defer mi.idxMutex.Unlock() diff --git a/internal/repository/repository.go b/internal/repository/repository.go index 72fc423c3..905982cba 100644 --- a/internal/repository/repository.go +++ b/internal/repository/repository.go @@ -47,6 +47,8 @@ func New(be restic.Backend) *Repository { return repo } +// DisableAutoIndexUpdate deactives the automatic finalization and upload of new +// indexes once these are full func (r *Repository) DisableAutoIndexUpdate() { r.noAutoIndexUpdate = true }