summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorAlexander Neumann <alexander@bumpern.de>2015-11-02 19:05:19 +0100
committerAlexander Neumann <alexander@bumpern.de>2015-11-02 19:07:03 +0100
commit1fc0d789136f33554bd901a6497b32580dea478d (patch)
tree824d78cf98abc5b4b7998f30e07fd7a57fbf4631 /cmd
parentf3f84b154441584750de7a2d89ecde2278430482 (diff)
Refactor Index.Store() to take a PackedBlob
Diffstat (limited to 'cmd')
-rw-r--r--cmd/restic/cmd_rebuild_index.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/restic/cmd_rebuild_index.go b/cmd/restic/cmd_rebuild_index.go
index 3582079b1..7a550354b 100644
--- a/cmd/restic/cmd_rebuild_index.go
+++ b/cmd/restic/cmd_rebuild_index.go
@@ -90,7 +90,7 @@ func (cmd CmdRebuildIndex) RebuildIndex() error {
}
blobsDone[b] = struct{}{}
- combinedIndex.Store(packedBlob.Type, packedBlob.ID, packedBlob.PackID, packedBlob.Offset, packedBlob.Length)
+ combinedIndex.Store(packedBlob)
}
combinedIndex.AddToSupersedes(indexID)
@@ -162,7 +162,13 @@ func (cmd CmdRebuildIndex) RebuildIndex() error {
for _, blob := range up.Entries {
debug.Log("RebuildIndex.RebuildIndex", "pack %v: blob %v", packID.Str(), blob)
- combinedIndex.Store(blob.Type, blob.ID, packID, blob.Offset, blob.Length)
+ combinedIndex.Store(repository.PackedBlob{
+ Type: blob.Type,
+ ID: blob.ID,
+ PackID: packID,
+ Offset: blob.Offset,
+ Length: blob.Length,
+ })
}
err = rd.Close()