summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-05-10 16:59:46 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-10 16:59:46 +0900
commitaaa3c8065d86e8f25850eb79e90da68d6adcf03f (patch)
treeac8883284fe2e056252c14f6916e5ee9312eff1a /refs
parentThe fourteenth batch (diff)
parenthex: print objects using the hash algorithm member (diff)
downloadtgif-aaa3c8065d86e8f25850eb79e90da68d6adcf03f.tar.xz
Merge branch 'bc/hash-transition-interop-part-1'
SHA-256 transition. * bc/hash-transition-interop-part-1: hex: print objects using the hash algorithm member hex: default to the_hash_algo on zero algorithm value builtin/pack-objects: avoid using struct object_id for pack hash commit-graph: don't store file hashes as struct object_id builtin/show-index: set the algorithm for object IDs hash: provide per-algorithm null OIDs hash: set, copy, and use algo field in struct object_id builtin/pack-redundant: avoid casting buffers to struct object_id Use the final_oid_fn to finalize hashing of object IDs hash: add a function to finalize object IDs http-push: set algorithm when reading object ID Always use oidread to read into struct object_id hash: add an algo member to struct object_id
Diffstat (limited to 'refs')
-rw-r--r--refs/debug.c2
-rw-r--r--refs/files-backend.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/refs/debug.c b/refs/debug.c
index 001e30651c..7db4abccc3 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -243,7 +243,7 @@ static int debug_read_raw_ref(struct ref_store *ref_store, const char *refname,
struct debug_ref_store *drefs = (struct debug_ref_store *)ref_store;
int res = 0;
- oidcpy(oid, &null_oid);
+ oidcpy(oid, null_oid());
errno = 0;
res = drefs->refs->be->read_raw_ref(drefs->refs, refname, oid, referent,
type);
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 119972ee16..3f29f8c143 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1084,7 +1084,7 @@ static void prune_ref(struct files_ref_store *refs, struct ref_to_prune *r)
ref_transaction_add_update(
transaction, r->name,
REF_NO_DEREF | REF_HAVE_NEW | REF_HAVE_OLD | REF_IS_PRUNING,
- &null_oid, &r->oid, NULL);
+ null_oid(), &r->oid, NULL);
if (ref_transaction_commit(transaction, &err))
goto cleanup;