Re: [PATCH 1/1] submodule foreach: fix recursion of options

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

 



On Wed, Jun 12, 2019 at 2:10 PM Morian Sonnet via GitGitGadget
<gitgitgadget@xxxxxxxxx> wrote:
> [...]
> . Add -- before the command to execute, such that now correctly
>
>     git --super-prefix <submodulepath> submodule--helper \
>       foreach --recursive -- git reset --hard
>
>   is called.
>
> Signed-off-by: Morian Sonnet <moriansonnet@xxxxxxxxxxxxxx>
> ---
> diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
> @@ -421,4 +421,9 @@ test_expect_success 'option-like arguments passed to foreach commands are not lo
> +test_expect_success 'option-like arguments passed to foreach recurse correctly' '
> +  cd super &&
> +  git submodule foreach --recursive git reset --hard
> +'

Follow the example of the existing tests in this script and do the
'cd' in a subshell so that it doesn't bleed into tests added later
following this one, thus confusing them.

    (
        cd super &&
        git submodule foreach ...
    )



[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]

  Powered by Linux