Commit Graph

3 Commits

Author SHA1 Message Date
brian m. carlson
da4fdef00b
Support SHA-256 repositories
Git will start to support SHA-256 as a hash for repositories in the near
future.  Let's update gitobj to version 2 to support SHA-256
repositories properly.  We initialize the repository based on the
extensions.objectFormat value, if one is provided, since this is the
configuration key that represents the hash algorithm.

Vendor the proper dependencies in place.
2020-07-29 20:53:44 +00:00
brian m. carlson
e3fcde746a git: replace object scanner with one based on gitobj
Currently, our object scanner is based on calling git cat-file --batch.
This is less efficient than reading the objects ourselves in process, so
update the object scanner to use our gitobj package instead.

Remove the reset function from the object scanner, since it is no longer
used.  Also, since we no longer need to worry about reading too much
data from git cat-file --batch, switch the io.LimitedReader to a plain
io.Reader to simplify the code.

Note that in the tests we now specify the object ID of the pointer item
to scan since we no longer can implicitly read from a fake buffer.
Consequently, we no longer look for a trailing entry, since that won't
succeed anymore.
2018-09-11 18:43:27 +00:00
Taylor Blau
2e7646b98b lfs: rename CatFileBatchScanner to PointerScanner 2017-04-04 14:35:03 -06:00