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

Re: [PATCH 1/2] rm: only refresh entries that we may touch

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jan 16, 2010, 10:58 UTC
Message-ID
<fcaeb9bf1001160258w476be063s595568afef088f42@mail.gmail.com>
In-Reply-To
<7v8wbyiry4.fsf@alter.siamese.dyndns.org>
On 1/16/10, Junio C Hamano <gitster@pobox.com> wrote:
Show 26 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>  > diff --git a/builtin-rm.c b/builtin-rm.c
>  > index 57975db..4cac3d1 100644
>  > --- a/builtin-rm.c
>  > +++ b/builtin-rm.c
>  > @@ -169,7 +169,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
>  >
>  >       if (read_cache() < 0)
>  >               die("index file corrupt");
>  > -     refresh_cache(REFRESH_QUIET);
>  >
>  >       pathspec = get_pathspec(prefix, argv);
>  >       seen = NULL;
>  > @@ -181,6 +180,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
>  >               struct cache_entry *ce = active_cache[i];
>  >               if (!match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, seen))
>  >                       continue;
>  > +             refresh_cache_entry(ce, 1);
>
>
> Why does this pass "1" instead of "0"?  The existing code does not give
>  refresh_cache() REFRESH_REALLY bit, and a patch that is marked as a pure
>  optimization should pass 0.  If you really mean it, please spell it as
>  CE_MATCH_IGNORE_VALID and justify why it is a good change in a separate
>  patch.

"refresh_cache(REFRESH_QUIET);" does pass "0" indeed. Can you please change it to "0"? Thanks.

-- 
Duy
Previous: Junio C HamanoNext: Nguyễn Thái Ngọc Duy
Message 4 of 10 in “Improve Git performance on big trees”
  1. 0/2 Improve Git performance on big treesNguyễn Thái Ngọc Duy, Jan 14, 2010
  2. 1/2 rm: only refresh entries that we may touchNguyễn Thái Ngọc Duy, Jan 14, 2010
  3. Junio C HamanoJan 16, 2010
  4. Nguyen Thai Ngoc DuyJan 16, 2010
  5. 2/2 status: only touch path we may need to checkNguyễn Thái Ngọc Duy, Jan 14, 2010
  6. Sverre RabbelierJan 14, 2010
  7. Junio C HamanoJan 16, 2010
  8. Martin LanghoffJan 14, 2010
  9. Nguyen Thai Ngoc DuyJan 15, 2010
  10. rm: only refresh entries that we may touchNguyễn Thái Ngọc Duy, Jan 17, 2010

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.