diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2022-11-14 13:37:12 -0800 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2022-11-14 16:55:50 -0500 |
commit | e62f779ae67ce3babe9e4ee934469993a5e6df49 (patch) | |
tree | 25c20d7d74ee6515f0a180edfa9ea3c867b38146 /Documentation/config | |
parent | 3b08839926fcc7cc48cf4c759737c1a71af430c1 (diff) | |
download | git-e62f779ae67ce3babe9e4ee934469993a5e6df49.tar.gz |
Doc: document push.recurseSubmodules=only
Git learned pushing submodules without pushing the superproject by
the user specifying --recurse-submodules=only through 6c656c3fe4
("submodules: add RECURSE_SUBMODULES_ONLY value", 2016-12-20) and
225e8bf778 ("push: add option to push only submodules", 2016-12-20).
For users who use this feature regularly, it is desirable to have an
equivalent configuration.
It turns out that such a configuration (push.recurseSubmodules=only) is
already supported, even though it is neither documented nor mentioned
in the commit messages, due to the way the --recurse-submodules=only
feature was implemented (a function used to parse --recurse-submodules
was updated to support "only", but that same function is used to parse
push.recurseSubmodules too). What is left is to document it and test it,
which is what this commit does.
There is a possible point of confusion when recursing into a submodule
that itself has the push.recurseSubmodules=only configuration, because
if a repository has only its submodules pushed and not itself, its
superproject can never be pushed. Therefore, treat such configurations
as being "on-demand", and print a warning message.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'Documentation/config')
-rw-r--r-- | Documentation/config/push.txt | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt index 7386fea225..43338b65e8 100644 --- a/Documentation/config/push.txt +++ b/Documentation/config/push.txt @@ -110,18 +110,8 @@ This will result in only b (a and c are cleared). ---- push.recurseSubmodules:: - Make sure all submodule commits used by the revisions to be pushed - are available on a remote-tracking branch. If the value is 'check' - then Git will verify that all submodule commits that changed in the - revisions to be pushed are available on at least one remote of the - submodule. If any commits are missing, the push will be aborted and - exit with non-zero status. If the value is 'on-demand' then all - submodules that changed in the revisions to be pushed will be - pushed. If on-demand was not able to push all necessary revisions - it will also be aborted and exit with non-zero status. If the value - is 'no' then default behavior of ignoring submodules when pushing - is retained. You may override this configuration at time of push by - specifying '--recurse-submodules=check|on-demand|no'. + May be "check", "on-demand", "only", or "no", with the same behavior + as that of "push --recurse-submodules". If not set, 'no' is used by default, unless 'submodule.recurse' is set (in which case a 'true' value means 'on-demand'). |