Re: [PATCH/RFC] clone: inform the user we are checking out
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- May 7, 2012, 10:02 UTC
- Message-ID
- <CABPQNSYe6dDf20D2pQpF=K97rZnWxqe5weEdO+FdKck9rwwzWg@mail.gmail.com>
- In-Reply-To
- <CABPQNSbbH3ULjgYxW6RdH0emrgXoKf1mkiEAm2fR19LsC5q8_w@mail.gmail.com>
On Mon, May 7, 2012 at 11:46 AM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
Show 18 quoted lines
> On Mon, May 7, 2012 at 11:35 AM, Erik Faye-Lund <kusmabite@gmail.com> wrote: >> On Mon, May 7, 2012 at 11:26 AM, Johannes Sixt <j.sixt@viscovery.net> wrote: >>> Am 5/7/2012 11:09, schrieb Erik Faye-Lund: >>>> I asked git >>>> to clone, and it told me it finished, only to hang around for >>>> several minutes while, judging by the output, doing nothing. >>> >>> We have a nice "Checking out files" progress indicator. I wonder why you >>> do not see it. > > It seems progress is only enabled when cloning with the verbose-flag. > This is because check_updates in unpack-trees.c only enabled progress > if both o->update and o->verbose_update is set, and checkout in > builtin/clone.c fills in opts.verbose_update with (option_verbosity > > 0). > > So that's that mystery. I still think the output without the > verbose-flag is confusing as-is.
OK, some blaming shows that this changed in 5bd631b3 ("clone: support multiple levels of verbosity"), back in February 2010. Before this patch, one would have to specify the "quiet"-flag to clone to suppress progress-output, after the patch the default is progress being off.
This seems like the right thing to do if we want to resurrect the progress-output's default-on behavior: ---8<---
diff --git a/builtin/clone.c b/builtin/clone.c index 3f863a1..f48e603 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; ---8<---