Thread (20 messages) 20 messages, 5 authors, 2022-03-07

Re: [PATCH] builtin/remote.c: show progress when renaming remote references

From: Taylor Blau <hidden>
Date: 2022-03-02 15:52:38

On Wed, Mar 02, 2022 at 09:32:48AM -0500, Derrick Stolee wrote:
quoted
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.
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help