Re: [PATCH v5] mru: Replace mru.[ch] with list.h implementation
- From
Jeff King <peff@peff.net>
- Date
- Jan 23, 2018, 00:15 UTC
- Message-ID
- <20180123001500.GD26357@sigill.intra.peff.net>
- In-Reply-To
- <20180122073701.h7fh7xrkmnzndzj7@untitled>
On Mon, Jan 22, 2018 at 07:37:01AM +0000, Eric Wong wrote:
Show 13 quoted lines
> > --- a/packfile.c
> > +++ b/packfile.c
> > @@ -859,9 +859,8 @@ static void prepare_packed_git_mru(void)
> > {
> > struct packed_git *p;
> >
> > - mru_clear(&packed_git_mru);
>
> But the removed mru_clear needs to be replaced with:
>
> + INIT_LIST_HEAD(&packed_git_mru);
>
> Otherwise, t3050 never finishes for me.Good catch. One alternative is to just add any new packs to the end (or beginning) of the mru list, instead of "resetting" it here. We can do that because we know that prepare_packed_git() never drops list entries, but only adds new ones.
I'm OK with it either way, though.
-Peff