git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Eric Wong
Message 3 of 3 in “mru: Replace mru.[ch] with list.h implementation”
  1. mru: Replace mru.[ch] with list.h implementationGargi Sharma, Jan 21, 2018
  2. Eric WongJan 22, 2018
  3. Jeff KingJan 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.