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

Re: [PATCH] status: show progress bar if refreshing the index takes too long

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 7, 2018, 21:10 UTC
Message-ID
<CAPig+cRvbvH4cZZhWTf2xHrJuD8n75bdJNX2BMHgSCveppOC+w@mail.gmail.com>
In-Reply-To
<796edb6b-74ec-35dc-4bae-7a817f8fa9b5@gmail.com>
On Fri, Sep 7, 2018 at 4:29 PM Derrick Stolee <stolee@gmail.com> wrote:
Show 17 quoted lines
> On 9/7/2018 1:38 PM, Eric Sunshine wrote:
> > On Fri, Sep 7, 2018 at 11:51 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> >> +               if (progress)
> >> +                       display_progress(progress, i);
> >> +       if (progress)
> >> +               stop_progress(&progress);
> > Nit: Both display_progress() and stop_progress() behave sanely when
> > 'progress' is NULL, so no need for the conditional.
>
> Don't forget this one in preload-index.c:preload_index():
> +       if (pd.progress)
> +               stop_progress(&pd.progress);
>
> I found this extra one by creating the following rules in a Coccinelle script:
> - if (e) { stop_progress(&e); }
> - if (e) { display_progress(e, i); }
> Not sure if we want to put these in a .cocci script or not.
If so, we'd want to match display_throughput() and stop_progress_msg(), as well.
Previous: Derrick StoleeNext: Nguyễn Thái Ngọc Duy
Message 4 of 5 in “status: show progress bar if refreshing the index takes too long”
  1. status: show progress bar if refreshing the index takes too longNguyễn Thái Ngọc Duy, Sep 7, 2018
  2. Eric SunshineSep 7, 2018
  3. Derrick StoleeSep 7, 2018
  4. Eric SunshineSep 7, 2018
  5. status: show progress bar if refreshing the index takes too longNguyễn Thái Ngọc Duy, Sep 15, 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.