Download raw body.
delete unused code
spotted while i was hunting for got_sha1_digest_to_str.
-----------------------------------------------
commit f3f5870b81ad355efa0bd5af632a7e1180d204f7 (main)
from: Omar Polo <op@omarpolo.com>
date: Fri Feb 3 09:47:19 2023 UTC
delete unused code
serializes an id to a local buffer before before returning.
diff 575fac0e51cf92038e551641f8bf57a67fa18d72 f3f5870b81ad355efa0bd5af632a7e1180d204f7
commit - 575fac0e51cf92038e551641f8bf57a67fa18d72
commit + f3f5870b81ad355efa0bd5af632a7e1180d204f7
blob - b6f93ea1f854fbe1e7aa1909e1068510b3e517a1
blob + dbd1daa943f326573aefc06b1316d88bee4e852a
--- lib/pack_index.c
+++ lib/pack_index.c
@@ -595,11 +595,8 @@ update_packidx(struct got_packidx *packidx, uint32_t n
uint32_t nindexed = be32toh(packidx->hdr.fanout_table[0xff]);
idx = find_object_idx(packidx, obj->id.sha1);
- if (idx == -1) {
- char hex[SHA1_DIGEST_STRING_LENGTH];
- got_sha1_digest_to_str(obj->id.sha1, hex, sizeof(hex));
+ if (idx == -1)
return; /* object already indexed */
- }
memmove(&packidx->hdr.sorted_ids[idx + 1],
&packidx->hdr.sorted_ids[idx],
delete unused code