On Wed, Nov 4, 2020 at 9:34 PM Matheus Tavares <matheus.bernardino@xxxxxx> wrote: The title might be a bit shorter with: s/which takes/taking/ or s/which takes/using/ > @@ -530,12 +531,12 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state, > if (nr_checkouts) > (*nr_checkouts)++; > > - if (S_ISREG(ce->ce_mode)) { > + if (S_ISREG(ce->ce_mode) && !ca) { > convert_attrs(state->istate, &ca_buf, ce->name); > ca = &ca_buf; > } I wonder if it's possible to avoid repeating the above 4 lines twice in this function. > - return write_entry(ce, path.buf, NULL, state, 0); > + return write_entry(ce, path.buf, ca, state, 0); It's good that ca is eventually passed here, but it might belong to the previous patch. > -int checkout_entry(struct cache_entry *ce, const struct checkout *state, > - char *topath, int *nr_checkouts); > +#define checkout_entry(ce, state, topath, nr_checkouts) \ > + checkout_entry_ca(ce, NULL, state, topath, nr_checkouts) I thought that we prefer inline functions over macros when possible.