Commit Diff


commit - 96b72a8e59762459b768550828282251000959a4
commit + 0c0d91c226092a6a2308a984372b445983ae8f0e
blob - c8d4ca877312a35b65221c284f4dbedca6a0373a
blob + 476f5c2e9d14bc9725ad7a2265ee8e34a6341696
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -1354,6 +1354,9 @@ enumeration_request(struct imsg *imsg, struct imsgbuf 
 				free(buf);
 				goto done;
 			}
+			idx = got_packidx_get_object_idx(packidx, &tag->id);
+			if (idx == -1)
+				break;
 			err = open_commit(&commit, pack, packidx, idx,
 			    &tag->id, objcache);
 			got_object_tag_close(tag);