Hi Stefan, On Mon, 18 Jun 2018, Stefan Beller wrote: > On Mon, Jun 18, 2018 at 6:19 AM Alban Gruin <alban.gruin@xxxxxxxxx> wrote: > > > > +int setup_reflog_action(struct replay_opts *opts, const char *commit, > > + int verbose) > > +{ > > + const char *action; > > + > > + if (commit && *commit) { > > While this is defensive programming (checking the pointer before dereferencing > it, the first condition (commit == NULL) should never be false here, > as the caller > checks for argc == 2 ? But it is not marked as `static` (or is it?). So we should not rely on the caller to Do The Right Thing. Ciao, Dscho