diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-30 08:11:40 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-10-02 16:34:47 -0400 |
| commit | 31ecaca2d3e87d20782a54cb319f5c19e6c6e62f (patch) | |
| tree | 06131413f2e42a8c3e51bbe0134f9267531bad62 /src/pack-objects.c | |
| parent | 2a713da1ec2e9f74c9edc75b06540ab095c68c34 (diff) | |
| download | libgit2-31ecaca2d3e87d20782a54cb319f5c19e6c6e62f.tar.gz | |
hash: hash functions operate on byte arrays not git_oids
Separate the concerns of the hash functions from the git_oid functions.
The git_oid structure will need to understand either SHA1 or SHA256; the
hash functions should only deal with the appropriate one of these.
Diffstat (limited to 'src/pack-objects.c')
| -rw-r--r-- | src/pack-objects.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c index 560f57d03..d89a4e780 100644 --- a/src/pack-objects.c +++ b/src/pack-objects.c @@ -664,7 +664,7 @@ static int write_pack(git_packbuilder *pb, pb->nr_remaining -= pb->nr_written; } while (pb->nr_remaining && i < pb->nr_objects); - if ((error = git_hash_final(&entry_oid, &pb->ctx)) < 0) + if ((error = git_hash_final(entry_oid.id, &pb->ctx)) < 0) goto done; error = write_cb(entry_oid.id, GIT_OID_RAWSZ, cb_data); |
