mirror of
https://github.com/restic/restic.git
synced 2025-08-23 15:18:07 +00:00
Fix non-intuitive repository behavior
- The SaveBlob method now checks for duplicates. - Moves handling of pending blobs to MasterIndex. -> also cleans up pending index entries when they are saved in the index -> when using SaveBlob no need to care about index any longer - Always check for full index and save it when storing packs. -> removes the need of an index uploader -> also removes the verbose "uploaded intermediate index" messages - The Flush method now also saves the index - Fix race condition when checking and saving full/non-finalized indexes
This commit is contained in:
@@ -123,9 +123,10 @@ func TestIndexSerialize(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// serialize idx, unserialize to idx3
|
||||
// finalize; serialize idx, unserialize to idx3
|
||||
idx.Finalize()
|
||||
wr3 := bytes.NewBuffer(nil)
|
||||
err = idx.Finalize(wr3)
|
||||
err = idx.Encode(wr3)
|
||||
rtest.OK(t, err)
|
||||
|
||||
rtest.Assert(t, idx.Final(),
|
||||
|
Reference in New Issue
Block a user