From: Eric Sunshine <sunshine@sunshineco.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Git List" <git@vger.kernel.org>
Subject: Re: [PATCH] status: show progress bar if refreshing the index takes too long
Date: Fri, 7 Sep 2018 17:10:00 -0400 [thread overview]
Message-ID: <CAPig+cRvbvH4cZZhWTf2xHrJuD8n75bdJNX2BMHgSCveppOC+w@mail.gmail.com> (raw)
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:
> 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.
next prev parent reply other threads:[~2018-09-07 21:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 15:51 [PATCH] status: show progress bar if refreshing the index takes too long Nguyễn Thái Ngọc Duy
2018-09-07 17:38 ` Eric Sunshine
2018-09-07 20:29 ` Derrick Stolee
2018-09-07 21:10 ` Eric Sunshine [this message]
2018-09-15 17:56 ` [PATCH v2] " Nguyễn Thái Ngọc Duy
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPig+cRvbvH4cZZhWTf2xHrJuD8n75bdJNX2BMHgSCveppOC+w@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=stolee@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.
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 NNTP newsgroup(s).