mirror of
https://github.com/restic/restic.git
synced 2025-08-12 11:37:40 +00:00
copy: Remove separate SaveIndex in restic copy
Flush does this now.
This commit is contained in:

committed by
Michael Eischer

parent
7048cc3e58
commit
4508d406ef
@@ -120,14 +120,7 @@ func runCopy(opts CopyOptions, gopts GlobalOptions, args []string) error {
|
|||||||
if err = dstRepo.Flush(ctx); err != nil {
|
if err = dstRepo.Flush(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
debug.Log("flushed packs")
|
debug.Log("flushed packs and saved index")
|
||||||
|
|
||||||
err = dstRepo.SaveIndex(ctx)
|
|
||||||
if err != nil {
|
|
||||||
debug.Log("error saving index: %v", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
debug.Log("saved index")
|
|
||||||
|
|
||||||
// save snapshot
|
// save snapshot
|
||||||
sn.Parent = nil // Parent does not have relevance in the new repo.
|
sn.Parent = nil // Parent does not have relevance in the new repo.
|
||||||
|
Reference in New Issue
Block a user