On Fri, Jan 19, 2018 at 6:36 PM, Gargi Sharma <gs051095@xxxxxxxxx> wrote: > Replace the custom calls to mru.[ch] with calls to list.h. This patch is > the final step in removing the mru API completely and inlining the logic. > This patch leads to significant code reduction and the mru API hence, is > not a useful abstraction anymore. A couple minor style nits below... (may not be worth a re-roll) > Signed-off-by: Gargi Sharma <gs051095@xxxxxxxxx> > --- > diff --git a/cache.h b/cache.h > @@ -1587,10 +1588,10 @@ extern struct packed_git { > } *packed_git; > > /* > - * A most-recently-used ordered version of the packed_git list, which can > - * be iterated instead of packed_git (and marked via mru_mark). > + * A most-recently-used ordered version of the packed_git list. > */ > -extern struct mru packed_git_mru; > +extern struct list_head packed_git_mru; > + Unnecessary extra blank line. > struct pack_entry { > off_t offset; > diff --git a/packfile.c b/packfile.c > @@ -859,9 +859,9 @@ static void prepare_packed_git_mru(void) > { > struct packed_git *p; > > - mru_clear(&packed_git_mru); > - for (p = packed_git; p; p = p->next) > - mru_append(&packed_git_mru, p); > + for (p = packed_git; p; p = p->next) { > + list_add_tail(&p->mru, &packed_git_mru); > + } Unnecessary braces on for-loop. > }