On Fri, Mar 07, 2025 at 06:53:31AM -0600, Karthik Nayak wrote: > Patrick Steinhardt <ps@xxxxxx> writes: > > On Fri, Mar 07, 2025 at 12:17:26PM +0100, Karthik Nayak wrote: > >> @@ -447,10 +456,56 @@ static int cmd_reflog_exists(int argc, const char **argv, const char *prefix, > >> refname); > >> } > >> > >> +static int cmd_reflog_drop(int argc, const char **argv, const char *prefix, > >> + struct repository *repo) > >> +{ > >> + int i, ret, do_all; > >> + const struct option options[] = { > >> + OPT_BOOL(0, "all", &do_all, N_("process the reflogs of all references")), > >> + OPT_END() > >> + }; > >> + > >> + do_all = ret = 0; > > > > Can't we initiailize the variables directly when declaring them? > > > > We can, let me fix it! I'll also move the initialization of 'i' down to > the loop while we're here. You can also avoid declaring `i` here at all and just declare it inside the loop. Patrick