Re: [PATCH] push: add recurseSubmodules config option

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

 



On Mon, Nov 16, 2015 at 5:24 AM, Mike Crowe <mac@xxxxxxxxxx> wrote:
> The --recurse-submodules command line parameter has existed for some
> time but it has no config file equivalent.
>
> Following the style of the corresponding parameter for git fetch, let's
> invent push.recurseSubmodules to provide a default for this
> parameter. This also requires the addition of --recurse-submodules=no to
> allow the configuration to be overridden on the command line when
> required.
>
> The most straightforward way to implement this appears to be to make
> push use code in submodule-config in a similar way to fetch.
>
> Signed-off-by: Mike Crowe <mac@xxxxxxxxxx>
> ---

The code itself looks good to me, one nit in the tests though.

> @@ -79,6 +87,119 @@ test_expect_success 'push succeeds after commit was pushed to remote' '
>         )
>  '
>
> +test_expect_success 'push succeeds if submodule commit not on remote but using on-demand on command line' '
> +       (
> +               cd work/gar/bage &&
> +               >recurse-on-demand-on-command-line &&
> +               git add recurse-on-demand-on-command-line &&
> +               git commit -m "Recurse on-demand on command line junk"
> +       ) &&
> +       (
> +               cd work &&
> +               git add gar/bage &&
> +               git commit -m "Recurse on-demand on command line for gar/bage" &&
> +               git push --recurse-submodules=on-demand ../pub.git master &&
> +               # Check that the supermodule commit got there
> +               git fetch ../pub.git &&
> +               git diff --quiet FETCH_HEAD master

Missing && chain here.

> +               # Check that the submodule commit got there too
> +               cd gar/bage &&
> +               git diff --quiet origin/master master
> +       )
> +'
> +
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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