From: Eric Wong <e@80x24.org>
To: Gargi Sharma <gs051095@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v5] mru: Replace mru.[ch] with list.h implementation
Date: Mon, 22 Jan 2018 07:37:01 +0000 [thread overview]
Message-ID: <20180122073701.h7fh7xrkmnzndzj7@untitled> (raw)
In-Reply-To: <1516497964-6041-1-git-send-email-gs051095@gmail.com>
Gargi Sharma <gs051095@gmail.com> wrote:
> 7 files changed, 15 insertions(+), 86 deletions(-)
Thanks! I like the code reduction and increased use of list.h
Were you able to finish running the test suite? I wasn't :<
> -void mru_clear(struct mru *head)
> -{
> - struct list_head *pos;
> - struct list_head *tmp;
> -
> - list_for_each_safe(pos, tmp, &head->list) {
> - free(list_entry(pos, struct mru, list));
> - }
> - INIT_LIST_HEAD(&head->list);
> -}
OK, the free() calls are no longer necessary...
<snip>
> --- 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.
> for (p = packed_git; p; p = p->next)
> - mru_append(&packed_git_mru, p);
> + list_add_tail(&p->mru, &packed_git_mru);
> }
Everything else looks good to me, I'm still waiting for the test
suite to run but I don't expect further problems.
next prev parent reply other threads:[~2018-01-22 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-21 1:26 [PATCH v5] mru: Replace mru.[ch] with list.h implementation Gargi Sharma
2018-01-22 7:37 ` Eric Wong [this message]
2018-01-23 0:15 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180122073701.h7fh7xrkmnzndzj7@untitled \
--to=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=gs051095@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).