bundle: switch to use the_hash_algo

Switch a use of the constant 40 and a use of GIT_SHA1_HEXSZ to use the_hash_algo instead. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Aug 18, 2019 at 20:04 UTC 703d2d4193738526d7b4116657657101e49a601e
1 file changed +2 -2
bundle.c
+2 -2
@@ -282,7 +282,7 @@ static int write_pack_data(int bundle_fd, struct rev_info *revs)
282 struct object *object = revs->pending.objects[i].item;
283 if (object->flags & UNINTERESTING)
284 write_or_die(pack_objects.in, "^", 1);
285 - write_or_die(pack_objects.in, oid_to_hex(&object->oid), GIT_SHA1_HEXSZ);
285 + write_or_die(pack_objects.in, oid_to_hex(&object->oid), the_hash_algo->hexsz);
286 write_or_die(pack_objects.in, "\n", 1);
287 }
288 close(pack_objects.in);
@@ -414,7 +414,7 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
414 }
415
416 ref_count++;
417 - write_or_die(bundle_fd, oid_to_hex(&e->item->oid), 40);
417 + write_or_die(bundle_fd, oid_to_hex(&e->item->oid), the_hash_algo->hexsz);
418 write_or_die(bundle_fd, " ", 1);
419 write_or_die(bundle_fd, display_ref, strlen(display_ref));
420 write_or_die(bundle_fd, "\n", 1);