2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-16 01:57:10 +00:00

Adjust comments to match name of exported methods

This commit is contained in:
Michael Eischer 2020-07-28 22:24:43 +02:00
parent dc31529fc3
commit d0329cf3eb
4 changed files with 5 additions and 3 deletions

View File

@ -12,7 +12,7 @@ func DeleteFiles(gopts GlobalOptions, repo restic.Repository, fileList restic.ID
deleteFiles(gopts, true, repo, fileList, fileType) 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 // 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 { func DeleteFilesChecked(gopts GlobalOptions, repo restic.Repository, fileList restic.IDSet, fileType restic.FileType) error {
return deleteFiles(gopts, false, repo, fileList, fileType) return deleteFiles(gopts, false, repo, fileList, fileType)

View File

@ -394,7 +394,7 @@ func (idx *Index) Finalize() {
idx.packIDToIndex = nil 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. // finalized, an error is returned.
func (idx *Index) IDs() (restic.IDs, error) { func (idx *Index) IDs() (restic.IDs, error) {
idx.m.Lock() idx.m.Lock()

View File

@ -134,7 +134,7 @@ func (mi *MasterIndex) Insert(idx *Index) {
mi.idx = append(mi.idx, idx) 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) { func (mi *MasterIndex) StorePack(id restic.ID, blobs []restic.Blob) {
mi.idxMutex.Lock() mi.idxMutex.Lock()
defer mi.idxMutex.Unlock() defer mi.idxMutex.Unlock()

View File

@ -47,6 +47,8 @@ func New(be restic.Backend) *Repository {
return repo return repo
} }
// DisableAutoIndexUpdate deactives the automatic finalization and upload of new
// indexes once these are full
func (r *Repository) DisableAutoIndexUpdate() { func (r *Repository) DisableAutoIndexUpdate() {
r.noAutoIndexUpdate = true r.noAutoIndexUpdate = true
} }