All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Crowe <mac@mcrowe.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH] push: Improve --recurse-submodules support
Date: Wed, 02 Dec 2015 15:21:13 -0800	[thread overview]
Message-ID: <xmqqsi3k4ety.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1449050172-1119-1-git-send-email-mac@mcrowe.com> (Mike Crowe's message of "Wed, 2 Dec 2015 09:56:12 +0000")

Mike Crowe <mac@mcrowe.com> writes:

> b33a15b08131514b593015cb3e719faf9db20208 added support for the
> push.recurseSubmodules config option. After it was merged Junio C Hamano
> suggested some improvements:
>
>  - Declare recurse_submodules on a separate line.
>
>  - Accept multiple --recurse-submodules options on command line with the
>    last one winning. (This simplified the implementation too.)
>
> Also slightly improve one of the tests added in
> b33a15b08131514b593015cb3e719faf9db20208.

The above is overly verbose about how the commit materialized,
compared to the description of the merit of this update.

    push: fix --recurse-submodules breakage

    When b33a15b0 (push: add recurseSubmodules config option,
    2015-11-17) added push.recurseSubmodules configuration option,
    it also changed the command line parsing to allow
    --no-recurse-submodules to override configured default.
    However, the parsing of configuration variables and command line
    options did not follow the usual "last one wins" convention.
    Fix this.

    Also fix the declaration of the new file-scope global variable
    to put it on a separate line on its own.

or something?

Also describe what "slightly improve" really means.  What did the
old one not test that should have been tested?

Thanks.

> diff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh
> index 9fda7b0..9a637f5 100755
> --- a/t/t5531-deep-submodule-push.sh
> +++ b/t/t5531-deep-submodule-push.sh
> @@ -126,7 +126,7 @@ test_expect_success 'push succeeds if submodule commit not on remote but using o
>  	)
>  '
>  
> -test_expect_success 'push fails if submodule commit not on remote using check from cmdline overriding config' '
> +test_expect_success 'push recurse-submodules cmdline overrides config' '
>  	(
>  		cd work/gar/bage &&
>  		>recurse-check-on-command-line-overriding-config &&
> @@ -142,8 +142,38 @@ test_expect_success 'push fails if submodule commit not on remote using check fr
>  		git fetch ../pub.git &&
>  		git diff --quiet FETCH_HEAD master^ &&
>  		# Check that the submodule commit did not get there
> -		cd gar/bage &&
> -		git diff --quiet origin/master master^
> +		(cd gar/bage && git diff --quiet origin/master master^) &&

These days, you can do:

		git -C gar/bage --quiet origin/master master^

instead.

  reply	other threads:[~2015-12-02 23:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 11:49 [PATCH v3] push: add recurseSubmodules config option Mike Crowe
2015-12-02  0:40 ` Jeff King
2015-12-02  9:54   ` Mike Crowe
2015-12-02  9:56     ` [PATCH] push: Improve --recurse-submodules support Mike Crowe
2015-12-02 23:21       ` Junio C Hamano [this message]
2015-12-03 13:10         ` Mike Crowe
2015-12-03 13:10           ` [PATCH 1/2] push: Fully test --recurse-submodules on command line overrides config Mike Crowe
2015-12-03 13:10             ` [PATCH 2/2] push: Use "last one wins" convention for --recurse-submodules Mike Crowe
2015-12-04 21:04               ` Junio C Hamano
2015-12-10 23:31               ` Stefan Beller
2015-12-10 23:38                 ` Junio C Hamano
2015-12-10 23:44                   ` Stefan Beller
2015-12-16 20:48             ` [PATCH 1/2] push: Fully test --recurse-submodules on command line overrides config Stefan Beller
2015-12-16 22:41               ` Junio C Hamano
2015-12-16 22:46                 ` Stefan Beller
2015-12-17 16:41                   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=xmqqsi3k4ety.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mac@mcrowe.com \
    --cc=peff@peff.net \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.