From: Derrick Stolee Date: Wed, 01 Aug 2018 20:41:10 GMT Subject: Re: [PATCH v2 17/18] commit-reach: make can_all_from_reach... linear Message-ID: <699cb8a9-dafc-8450-b992-0fb5c8afe1c2@gmail.com> In-Reply-To: <20180723204112.233274-1-jonathantanmy@google.com> On 7/23/2018 4:41 PM, Jonathan Tan wrote: >> + if (parse_commit(list[i]) || >> + list[i]->generation < min_generation) > Here... > >> + if (parse_commit(parent->item) || >> + parent->item->date < min_commit_date || >> + parent->item->generation < min_generation) > ...and here, would parse_commit_or_die() be better? I think that a > function that returns a definitive answer (either the commits are > reachable or not) should die when the commits cannot be parsed. I'm hesitant to add _or_die() here, when the previous implementation only used parse_object() or parse_commit(), so would not die when parsing fails. The same holds true for the other methods that call can_all_from_reach(). Thanks, -Stolee