Re: [PATCH v2] Doc: document push.recurseSubmodules=only

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

 



First of all, thanks for taking a look at this.

Glen Choo <chooglen@xxxxxxxxxx> writes:
> That said.. I find the status quo very surprising and unergonomic. As
> demonstrated in a test below, if a submodule has push.recurseSubmodules
> unset, recursion doesn't occur. At the very least, I would have expected
> the submodule to respect the superproject's config since that's still a
> statement of intent.
> 
> I expect that we will have to change this behavior at some point, and
> hopefully my "ideal" behavior makes sense to users.

Well, your "ideal" behavior makes sense to me :-)

> When we pass this magic, undocumented value, "git push" will warn about
> about "only" and override it with "on-demand". We always pass it when we
> recurse into submodules, and we assume that no user will pass it, thus
> we get the warning iff we are recursing into submodules.
> 
> In that case, it sounds like "--recurse-submodules=only-is-on-demand" is
> a synonym for "this is a submodule that is being recursed into". In that
> case, wouldn't it be more self-documenting to have a hidden CLI flag
> that expresses exactly that ? e.g. we could add a PARSE_OPT_HIDDEN flag
> called "--is-recursing" and check that boolean value. This seems clearer
> to me at least.

Hmm...--recurse-submodules=only-is-on-demand is hidden too, right? One
advantage of doing this instead of a separate arg is that neither the
caller nor "git push" needs to think about what happens if both --recurse-
submodules=something and --is-recursing are both specified.



[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