commit c1f3b0bfad7a8052e11c77552c4b095a1515020c from: Stefan Sperling via: Thomas Adam date: Wed Feb 05 12:44:19 2025 UTC avoid the needless check for set membership in got-read-pack as well The list of ids traversed here won't contain IDs already present in the set. commit - d60b4329437936f4c90fe1c112ef27be6b86ddf7 commit + c1f3b0bfad7a8052e11c77552c4b095a1515020c blob - 8c6db6edfbedb53647b5c05a25be937195605680 blob + 7e52756f9211c011c9f5681c3893d02cab59d394 --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -1736,11 +1736,9 @@ repaint_parent_commits(struct got_object_id *commit_id if (err) break; - if (!got_object_idset_contains(set, &pid->id)) { - err = got_object_idset_add(set, &pid->id, NULL); - if (err) - break; - } + err = got_object_idset_add(set, &pid->id, NULL); + if (err) + break; STAILQ_REMOVE_HEAD(&repaint, entry);