commit 17e46db594a295989340e4610fa50e8c075e2254881566a724a42d5ebc8f4c21 from: Stefan Sperling date: Mon Nov 16 11:50:41 2026 UTC do not ask got-read-pack to paint commits which are known keeps or drops Avoids a long loop observed in gotadmin cleanup with enumeration offloaded to got-read-pack. commit - 808577a26fca1363896c388b85619dfdae201cc94190fa5fc1da03e48c8631e2 commit + 17e46db594a295989340e4610fa50e8c075e2254881566a724a42d5ebc8f4c21 blob - 6a4a0e258c032df33536c6290a7d49af96e88df84d93ac464a63ad7c8849ed9e blob + b2735975209928c7de4b76e6d56aabf2d42c556cc9925ce9d11fd5dfd1e27c01 --- lib/pack_create_privsep.c +++ lib/pack_create_privsep.c @@ -424,6 +424,23 @@ got_pack_paint_commits(int *ncolored, struct got_objec /* Use the fast path if we have a suitable pack file. */ if (packidx && pack) { + if (color == COLOR_KEEP && + got_object_idset_contains(keep, &qid->id)) { + STAILQ_REMOVE_HEAD(ids, entry); + nqueued--; + got_object_qid_free(qid); + qid = NULL; + continue; + } + if (color == COLOR_DROP && + got_object_idset_contains(drop, &qid->id)) { + STAILQ_REMOVE_HEAD(ids, entry); + nqueued--; + got_object_qid_free(qid); + qid = NULL; + continue; + } + idx = got_packidx_get_object_idx(packidx, &qid->id); if (idx != -1) { err = got_privsep_init_commit_painting(