summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2021-04-26 01:02:52 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-04-27 16:31:38 +0900
commitab795f0d77aec52496557eb69a5fc9e4f60ea1fd (patch)
tree78a5e3451fac3e53b12364f4f8c5c854da318e84 /diff.c
parenthttp-push: set algorithm when reading object ID (diff)
downloadtgif-ab795f0d77aec52496557eb69a5fc9e4f60ea1fd.tar.xz
hash: add a function to finalize object IDs
To avoid the penalty of having to branch in hash comparison functions, we'll want to always compare the full hash member in a struct object_id, which will require that SHA-1 object IDs be zero-padded. To do so, add a function which finalizes a hash context and writes it into an object ID that performs this padding. Move the definition of struct object_id and the constant definitions higher up so we they are available for us to use. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions