From: Stefan Beller Date: Mon, 16 Jul 2018 22:37:08 GMT Subject: Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear Message-ID: In-Reply-To: <816821eec9ba476ccdfbfdf6e3cdd3619743ea2e.1531746012.git.gitgitgadget@gmail.com> On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > Note how the time increases between the two cases in the two versions. > The new code increases relative to the number of commits that need to be > walked, but not directly relative to the number of 'from' commits. Cool! > int can_all_from_reach_with_flag(struct object_array *from, > int with_flag, int assign_flag, > - time_t min_commit_date) > + time_t min_commit_date, > + uint32_t min_generation) > { > for (i = 0; i < from->nr; i++) { [...] > + parse_commit(list[i]); parse_commit_or_die or handle the return code? (or a comment why we specifically are allowed to ignore the return code here) [...] > + for (parent = stack->item->parents; parent; parent = parent->next) { [...] > + parse_commit(parent->item); same here.