1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-11 22:56:14 +02:00
git/refs
brian m. carlson 14228447c9 hash: provide per-algorithm null OIDs
Up until recently, object IDs did not have an algorithm member, only a
hash.  Consequently, it was possible to share one null (all-zeros)
object ID among all hash algorithms.  Now that we're going to be
handling objects from multiple hash algorithms, it's important to make
sure that all object IDs have a correct algorithm field.

Introduce a per-algorithm null OID, and add it to struct hash_algo.
Introduce a wrapper function as well, and use it everywhere we used to
use the null_oid constant.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-04-27 16:31:39 +09:00
..
debug.c hash: provide per-algorithm null OIDs 2021-04-27 16:31:39 +09:00
files-backend.c hash: provide per-algorithm null OIDs 2021-04-27 16:31:39 +09:00
iterator.c use CALLOC_ARRAY 2021-03-13 16:00:09 -08:00
packed-backend.c use CALLOC_ARRAY 2021-03-13 16:00:09 -08:00
packed-backend.h refs/packed-backend.h: add missing declaration (hdr-check) 2018-09-20 11:50:00 -07:00
ref-cache.c use CALLOC_ARRAY 2021-03-13 16:00:09 -08:00
ref-cache.h refs/ref-cache.h: add missing declarations (hdr-check) 2018-09-20 11:50:00 -07:00
refs-internal.h Merge branch 'hn/refs-trace-backend' 2020-09-22 12:36:28 -07:00