Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear
- From
Stefan Beller <sbeller@google.com>
- Date
- Jul 16, 2018, 22:37 UTC
- Message-ID
- <CAGZ79kY5rEUp3Vsi5ux=KaC0t4vrp8UME-CaQtTvnYsizUGfFQ@mail.gmail.com>
- In-Reply-To
- <816821eec9ba476ccdfbfdf6e3cdd3619743ea2e.1531746012.git.gitgitgadget@gmail.com>
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> 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!
Show 6 quoted lines
> 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.