[PATCH] clone: fix progress-regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In 5bd631b3 ("clone: support multiple levels of verbosity"), the
default behavior to show progress of the implicit checkout in
the clone-command regressed so that progress was only shown if
the verbose-option was specified.

Fix this by making option_verbosity == 0 output progress as well.

Signed-off-by: Erik Faye-Lund <kusmabite@xxxxxxxxx>
---

Hmpf. While tidying this up for a proper submission, I found out that
writing a reliable test is tricky due to the start_progress_delay-usage.
I'd have to clone a repo that does not progress more than 50% of the
checkout-operation within one second or something like that (I didn't
quite follow the logic there), which is a lot :P. This strikes me as
error-prone, and I can't see an obvious hack around it (other than
modifying the progress-code, which I consider a somewhat nasty
alternative).

So perhaps writing a test to avoid similar breakages in the future isn't
worth it?

 builtin/clone.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index bbd5c96..a4d8d25 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -569,7 +569,7 @@ static int checkout(void)
 	opts.update = 1;
 	opts.merge = 1;
 	opts.fn = oneway_merge;
-	opts.verbose_update = (option_verbosity > 0);
+	opts.verbose_update = (option_verbosity >= 0);
 	opts.src_index = &the_index;
 	opts.dst_index = &the_index;
 
-- 
1.7.10.msysgit.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]