Mike Crowe <m...@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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to