From: Jeff King Date: Thu, 16 Jul 2026 09:18:22 GMT Subject: Re: [PATCH v4 3/3] commit-reach: die on contains walk errors Message-ID: <20260716091822.GA1212956@coredump.intra.peff.net> In-Reply-To: <20260612-ref-filter-memoized-contains-v4-3-5ed39fd001dd@gmail.com> On Fri, Jun 12, 2026 at 05:49:14PM -0400, Tamir Duberstein wrote: > int commit_contains(struct ref_filter *filter, struct commit *commit, > struct commit_list *list, struct contains_cache *cache) > { > + int result; > + > if (filter->with_commit_tag_algo || > generation_numbers_enabled(the_repository)) > return contains_tag_algo(commit, list, cache) == CONTAINS_YES; > - return repo_is_descendant_of(the_repository, commit, list); > + > + result = repo_is_descendant_of(the_repository, commit, list); > + if (result < 0) > + die(_("failed to check reachability")); > + return result; Makes sense. And we can see from the test that repo_is_descendant_of() will already have printed the real reason for the error. -Peff