git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Brandon Williams <bmwill@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] clone: teach recursive clones to respect -q
Date: Fri, 04 Aug 2017 09:07:52 -0700	[thread overview]
Message-ID: <xmqqvam3uxif.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170803222544.17216-1-bmwill@google.com> (Brandon Williams's message of "Thu, 3 Aug 2017 15:25:44 -0700")

Brandon Williams <bmwill@google.com> writes:

> Teach 'git clone --recurse-submodules' to respect the '-q' option by
> passing down the quiet flag to the process which handles cloning of
> submodules.
>
> Signed-off-by: Brandon Williams <bmwill@google.com>
> ---
>  builtin/clone.c            | 3 +++
>  t/t7400-submodule-basic.sh | 6 ++++++
>  2 files changed, 9 insertions(+)
>
> diff --git a/builtin/clone.c b/builtin/clone.c
> index 08b5cc433..f7e17d229 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> @@ -768,6 +768,9 @@ static int checkout(int submodule_progress)
>  		if (submodule_progress)
>  			argv_array_push(&args, "--progress");
>  
> +		if (option_verbosity < 0)
> +			argv_array_push(&args, "--quiet");
> +
>  		err = run_command_v_opt(args.argv, RUN_GIT_CMD);
>  		argv_array_clear(&args);
>  	}

Good spotting.  Makes me wonder if there still are other options we
might have missed, but we can incrementally improve as bug report
comes in ;-)

Will queue.  Thanks.

> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
> index dcac364c5..e9c3335b7 100755
> --- a/t/t7400-submodule-basic.sh
> +++ b/t/t7400-submodule-basic.sh
> @@ -1289,4 +1289,10 @@ test_expect_success 'init properly sets the config' '
>  	test_must_fail git -C multisuper_clone config --get submodule.sub1.active
>  '
>  
> +test_expect_success 'recursive clone respects -q' '
> +	test_when_finished "rm -rf multisuper_clone" &&
> +	git clone -q --recurse-submodules multisuper multisuper_clone >actual &&
> +	test_must_be_empty actual
> +'
> +
>  test_done

  parent reply	other threads:[~2017-08-04 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 22:25 [PATCH] clone: teach recursive clones to respect -q Brandon Williams
2017-08-03 22:32 ` Stefan Beller
2017-08-04 16:07 ` Junio C Hamano [this message]
2017-08-04 17:05   ` Brandon Williams

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqvam3uxif.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).