summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-14 08:50:08 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-14 10:26:33 -0700
commit861e8c76f6668a8cbb764ec0ea3ba425dfb86b2a (patch)
tree31f293d0b31897958e126e6cc98c2424568550aa /commit.c
parentd4d364b2c7442a1dd5bec8ab818791ec8769c3e9 (diff)
hash: make `is_null_oid()` independent of `the_repository`
The function `is_null_oid()` uses `oideq(oid, null_oid())` to check whether a given object ID is the all-zero object ID. `null_oid()` implicitly relies on `the_repository` though to return the correct null object ID. Get rid of this dependency by always comparing the complete hash array for being all-zeroes. This is possible due to the refactoring of object IDs so that their hash arrays are always fully initialized. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions