aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2023-10-01 21:40:06 -0500
committerJunio C Hamano <gitster@pobox.com>2023-10-02 14:57:38 -0700
commitd50cbe4a5d989c454c620cbaa0c64a06a4a2f9a2 (patch)
tree7107b01f91721267c31652737d50906440d3c8d8 /builtin/rev-parse.c
parentobject-file-convert: stubs for converting from one object format to another (diff)
downloadgit-d50cbe4a5d989c454c620cbaa0c64a06a4a2f9a2.tar.gz
git-d50cbe4a5d989c454c620cbaa0c64a06a4a2f9a2.zip
oid-array: teach oid-array to handle multiple kinds of oids
While looking at how to handle input of both SHA-1 and SHA-256 oids in get_oid_with_context, I realized that the oid_array in repo_for_each_abbrev might have more than one kind of oid stored in it simultaneously. Update to oid_array_append to ensure that oids added to an oid array always have an algorithm set. Update void_hashcmp to first verify two oids use the same hash algorithm before comparing them to each other. With that oid-array should be safe to use with different kinds of oids simultaneously. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rev-parse.c')
0 files changed, 0 insertions, 0 deletions