commit 8d099c2c4071f754faebc53661d8a6ee63ad91c3fe4a39a6dc9af0131bf48e5d from: Stefan Sperling date: Thu Feb 20 21:18:35 2025 UTC fix endless loop regression in got-read-pack's commit coloring implementation reported by jrick@ with a reproducible test case, thanks! commit - fa9e45087e93b94880c4d25a026969b906daeaa5c074f90aa41543290e2560f5 commit + 8d099c2c4071f754faebc53661d8a6ee63ad91c3fe4a39a6dc9af0131bf48e5d blob - 491995481b580a988c41c7f6378a85bdc3d961785cd953caaa4140f0e57df92f blob + b39284433eb64fa70b8ea8f155becc6907818692f78b8f5605f819e1d38a4a5c --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -1840,6 +1840,18 @@ paint_commits(struct got_object_id_queue *ids, int *ni qid = NULL; continue; } + if (color == COLOR_KEEP && + got_object_idset_contains(keep, &qid->id)) { + got_object_qid_free(qid); + qid = NULL; + continue; + } + if (color == COLOR_DROP && + got_object_idset_contains(drop, &qid->id)) { + got_object_qid_free(qid); + qid = NULL; + continue; + } switch (color) { case COLOR_KEEP: