Re: [PATCH] builtin/remote.c: show progress when renaming remote references
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 2, 2022, 15:52 UTC
- Message-ID
- <Yh+Sp5BxqxYhBv0M@nand.local>
- In-Reply-To
- <06ef2e2c-7048-1101-870a-4774a2dcd988@github.com>
On Wed, Mar 02, 2022 at 09:32:48AM -0500, Derrick Stolee wrote:
Show 6 quoted lines
> > Instead of a more complex modification to the ref transaction code, > > display a progress meter when running verbosely in order to convince the > > user that Git is doing work while renaming a remote. > > Thanks for this patch. It improves the user experience through > useful feedback.
Admittedly, it feels like a little bit of a shortcut to avoid modifying the ref transaction code, but I think it's an OK short-term solution. Thanks for reviewing.
Show 11 quoted lines
> > @@ -682,7 +686,8 @@ static int mv(int argc, const char **argv) > > old_remote_context = STRBUF_INIT; > > struct string_list remote_branches = STRING_LIST_INIT_DUP; > > struct rename_info rename; > > - int i, refspec_updated = 0; > > + int i, j = 0, refspec_updated = 0; > > My only complaint is that 'j' is not informative enough here. > > 'j' as a loop iterator is good, but we aren't looping "on" j, > but instead tracking a progress_count across multiple loops.
How about s/j/refs_renamed_nr ?
Thanks, Taylor