On Thu, Sep 04, 2025 at 04:27:41PM -0700, Junio C Hamano wrote: > Patrick Steinhardt <ps@xxxxxx> writes: > > diff --cc commit-graph.c > > index 9929c1ed87,2f20f66cfd..0000000000 > > --- a/commit-graph.c > > +++ b/commit-graph.c > > @@@ -823,7 -812,12 +823,11 @@@ int corrected_commit_dates_enabled(stru > > > > struct bloom_filter_settings *get_bloom_filter_settings(struct repository *r) > > { > > - struct commit_graph *g; > > + struct commit_graph *g = prepare_commit_graph(r); > > + > > - if (!prepare_commit_graph(r)) > > ++ if (!g) > > + return NULL; > > + > > The while (g) loop will be entirely skipped when g==NULL, and then > the function returns NULL after iterating the loop, so there is not > much reason to have these three lines for early-return, no? Ah, true. That's even better. Patrick