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

Re: [PATCH] gc --auto: do not run 'pack-refs' and 'reflog expire' twice

From
Duy Nguyen <pclouds@gmail.com>
Date
Sep 4, 2014, 14:13 UTC
Message-ID
<CACsJy8AY_hXMH+ML9SUm_89ykWDOMvB2XThVkaq5Aufes8=5AQ@mail.gmail.com>
In-Reply-To
<xmqqtx4pzvcp.fsf@gitster.dls.corp.google.com>
On Wed, Sep 3, 2014 at 2:16 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>>
>>> In the --auto code path, gc_before_repack() is called once in parent
>>> process then again in the forked process. Stop the second run.
>>
>> Hmph.  Is the true reason why this happens because we have two calls
>> to gc_before_repack() in the main, and one is before daemonize()?
>> Shouldn't this protection be in the caller?
>
> Actually, I think the function already is protecting wastage of
> getting called twice by saying "I've done pack-refs already" and
> "I've done prune-reflogs already" by setting the two variables to
> zero.  Isn't that sufficient?
>
> What problem is this patch trying to fix?

Oops. I missed that (and should have verified the problem in the first place). Sorry for the noise.

-- 
Duy
Previous: Junio C Hamano
Message 4 of 4 in “gc --auto: do not run 'pack-refs' and 'reflog expire' twice”
  1. gc --auto: do not run 'pack-refs' and 'reflog expire' twiceNguyễn Thái Ngọc Duy, Aug 31, 2014
  2. Junio C HamanoSep 2, 2014
  3. Junio C HamanoSep 2, 2014
  4. Duy NguyenSep 4, 2014

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.