commit e8c72451da38cc8d8c128d34707e9011275ca413 from: Stefan Sperling date: Sat Feb 1 15:28:40 2025 UTC avoid a needless check for set membership in got_pack_repaint_parent_commits() The list of ids traversed here won't contain IDs already present in the set. commit - 55856f575af1531296772ec6a544e38b06b006ad commit + e8c72451da38cc8d8c128d34707e9011275ca413 blob - c25715bba0e987026f6a367baab599c55273b1fa blob + a431102c044792d034104d386d7ac6962d471951 --- lib/pack_create.c +++ lib/pack_create.c @@ -1095,11 +1095,9 @@ got_pack_repaint_parent_commits(struct got_object_id * break; STAILQ_REMOVE_HEAD(&ids, entry); - if (!got_object_idset_contains(set, &qid->id)) { - err = got_object_idset_add(set, &qid->id, NULL); - if (err) - break; - } + err = got_object_idset_add(set, &qid->id, NULL); + if (err) + break; err = got_object_open_as_commit(&commit, repo, &qid->id); if (err)