summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-10 07:59:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-10 07:59:46 (GMT)
commitaaa3c8065d86e8f25850eb79e90da68d6adcf03f (patch)
treeac8883284fe2e056252c14f6916e5ee9312eff1a /refs.c
parent2d677e5b1537692a4f875740a6e9853c24285f02 (diff)
parent3dd71461e25b4cc7ea2a2d8deef1c0486bb32580 (diff)
downloadgit-aaa3c8065d86e8f25850eb79e90da68d6adcf03f.zip
git-aaa3c8065d86e8f25850eb79e90da68d6adcf03f.tar.gz
git-aaa3c8065d86e8f25850eb79e90da68d6adcf03f.tar.bz2
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.c')
-rw-r--r--refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 1616c75..8c94902 100644
--- a/refs.c
+++ b/refs.c
@@ -1107,7 +1107,7 @@ int ref_transaction_create(struct ref_transaction *transaction,
if (!new_oid || is_null_oid(new_oid))
BUG("create called without valid new_oid");
return ref_transaction_update(transaction, refname, new_oid,
- &null_oid, flags, msg, err);
+ null_oid(), flags, msg, err);
}
int ref_transaction_delete(struct ref_transaction *transaction,
@@ -1119,7 +1119,7 @@ int ref_transaction_delete(struct ref_transaction *transaction,
if (old_oid && is_null_oid(old_oid))
BUG("delete called with old_oid set to zeros");
return ref_transaction_update(transaction, refname,
- &null_oid, old_oid,
+ null_oid(), old_oid,
flags, msg, err);
}