commit 986deeab060e01c6985acf2405f27746018d5f7dcdf531ea1d60a78f6ea3164d from: Stefan Sperling date: Sat Feb 1 15:27:40 2025 UTC reduce indentation in got_pack_repaint_parent_commits(); no functional change commit - 2c99888b7cec0e63aafbf4f216c44ddbeb14798be8944058def910c098cfd136 commit + 986deeab060e01c6985acf2405f27746018d5f7dcdf531ea1d60a78f6ea3164d blob - 0f31c12a840d21287e496ade896ad2d198af0ac6cdac67596ec8e0ab84fd98b3 blob + 2f82038137b18cc7ea5b46b02aadeaf98a8043256220750c3fba6dd7aeeda1d8 --- lib/pack_create.c +++ lib/pack_create.c @@ -1091,23 +1091,22 @@ got_pack_repaint_parent_commits(struct got_object_id * commit = NULL; qid = STAILQ_FIRST(&ids); - if (qid) { - 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; - } + if (qid == NULL) + break; - err = got_object_open_as_commit(&commit, repo, - &qid->id); + 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; - - got_object_qid_free(qid); - qid = NULL; } + + err = got_object_open_as_commit(&commit, repo, &qid->id); + if (err) + break; + + got_object_qid_free(qid); + qid = NULL; } if (commit)