-
Notifications
You must be signed in to change notification settings - Fork 540
Feature/new packfile parser #898
Feature/new packfile parser #898
Conversation
plumbing/format/idxfile/writer.go
Outdated
"gopkg.in/src-d/go-git.v4/utils/binary" | ||
) | ||
|
||
type object struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already have Entry
in this package with this exact same struct, maybe you can use that?
plumbing/format/idxfile/writer.go
Outdated
crc uint32 | ||
} | ||
|
||
type objects []object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we using the objects
type for something specific (i don't see any methods for it)? If not, I'd say just go with []object
(or []Entry
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nvm, saw the methods at the end of the file
Now it supports 64 bit offsets but needs more testing. Index checksum is already generated by the encoder. |
b2508e4
to
51b3671
Compare
Signed-off-by: Javi Fontan <[email protected]>
In one case it disables the cache and the other disables lookup when the scanner is not seekable. Could be added back later. Signed-off-by: Javi Fontan <[email protected]>
It's still not complete: * 64 bit offsets * IdxChecksum Signed-off-by: Javi Fontan <[email protected]>
Signed-off-by: Javi Fontan <[email protected]>
Signed-off-by: Javi Fontan <[email protected]>
Signed-off-by: Javi Fontan <[email protected]>
Signed-off-by: Javi Fontan <[email protected]>
This functionality may be moved elsewhere in the future but is needed now to fit filesystem.ObjectStorage and the new index. Signed-off-by: Javi Fontan <[email protected]>
Index is also automatically generated when OnFooter is called. Signed-off-by: Javi Fontan <[email protected]>
Now dotgit.PackWriter uses the new packfile.Parser and index. Signed-off-by: Javi Fontan <[email protected]>
51b3671
to
79f2494
Compare
Needs #896
It needs tests and index writer is still not complete:
Some improvements can be done changing the cache to hold byte slices and index by offset. We can also skip reading headers in
resolveDeltas
phase.