Re: [PATCH v3 5/5] doc: --recurse-submodules mostly only apply to active submodules

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

 



> Le 20 mars 2020 à 17:37, Damien Robert <damien.olivier.robert@xxxxxxxxx> a écrit

in the title, I'd drop the "only"
"mostly only apply" -> "mostly applies"

> :
> 
> The documentation refers to "initialized" or "populated" submodules,
> to explain which submodules are affected by '--recurse-submodules', but
> the real terminology here is 'active' submodules. Update the
> documentation accordingly.
> 
> Some terminology:
> - Active is defined in gitsubmodules(7), it only involves the
>  configuration variables 'submodule.active', 'submodule.<name>.active'
>  and 'submodule.<name>.url'. The function
>  submodule.c::is_submodule_active checks that a submodule is active.
> - Populated means that the submodule's working tree is present (and the
>  gitfile correctly points to the submodule repository), i.e. either the
>  superproject was cloned with ` --recurse-submodules`, or the user ran
>  `git submodule update --init`, or `git submodule init [<path>]` and
>  `git submodule update [<path]`

missing a closing '>' here (my mistake).

> separately which populated the
>  submodule working tree. This does not involve the 3 configuration
>  variables above.
> - Initialized (at least in the context of the man pages involved in this
>  patch) means both "populated" and "active" as defined above, i.e. what
>  `git submodule update --init` does.
> 
> The --recurse-submodules option mostly affects submodules.

I think you meant  "mostly affects active submodules" here, right?

> An exception
> is `git fetch` where the option affects populated submodules.
> As a consequence, in `git pull` the fetch affects populated submodules,
> but the resulting working tree update only affects active submodules.
> 
> In the documentation of `git-pull` we only refer to active submodules,
> since it is implicit that the fetching behaviour is governed by the
> fetch command.

This last paragraph is not a description of the current state of the code base, 
but describes the changes introduced by this patch. As such, it's customary
to write it in the imperative mode. A simple suggestion to fix that:

s/we/let's/

> diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
> index 47bc4a7061..2285f3729d 100644
> --- a/Documentation/git-pull.txt
> +++ b/Documentation/git-pull.txt
> @@ -85,7 +85,7 @@ OPTIONS
> 	Pass --verbose to git-fetch and git-merge.
> 
> --[no-]recurse-submodules[=yes|on-demand|no]::
> -	This option controls if new commits of all populated submodules should
> +	This option controls if new commits of all active submodules should
> 	be fetched and updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and linkgit:gitmodules[5]).

I understand that the goal here is to make the formulation not too heavy, as you wrote in 
https://lore.kernel.org/git/20200320222328.lynvrgqc35pvxxnl@doriath/. However I think the formulation 
is awkward to begin with : commits are "fetched", but commits are not "updated", the submodules working tree 
are updated. So maybe:

This option controls if new commits of populated submodules should be fetched, 
and if the working trees of active submodules should be updated, too



[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