Refactor Index.Store() to take a PackedBlob

This commit is contained in:
Alexander Neumann committed 2015-11-02 19:07:03 +01:00
1 parent f3f84b1544
commit 1fc0d78913
4 files changed
+66 -19

No files matched your search

+7 -1
View File
@@ -270,7 +270,13 @@ func (r *Repository) savePacker(p *pack.Packer) error {
// update blobs in the index
for _, b := range p.Blobs() {
debug.Log("Repo.savePacker", " updating blob %v to pack %v", b.ID.Str(), sid.Str())
r.idx.Current().Store(b.Type, b.ID, sid, b.Offset, uint(b.Length))
r.idx.Current().Store(PackedBlob{
Type: b.Type,
ID: b.ID,
PackID: sid,
Offset: b.Offset,
Length: uint(b.Length),
})
r.idx.RemoveFromInFlight(b.ID)
}