diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2019-12-02 11:57:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-03 08:49:45 -0800 |
commit | 4f3e57ef13d0ad4c00d0a87f0858cde81456a2e0 (patch) | |
tree | cb86a3bd9dcb28f554950037e5f8f10acac393bf /Documentation | |
parent | Doc: explain submodule.alternateErrorStrategy (diff) | |
download | tgif-4f3e57ef13d0ad4c00d0a87f0858cde81456a2e0.tar.xz |
submodule--helper: advise on fatal alternate error
When recursively cloning a superproject with some shallow modules
defined in its .gitmodules, then recloning with "--reference=<path>", an
error occurs. For example:
git clone --recurse-submodules --branch=master -j8 \
https://android.googlesource.com/platform/superproject \
master
git clone --recurse-submodules --branch=master -j8 \
https://android.googlesource.com/platform/superproject \
--reference master master2
fails with:
fatal: submodule '<snip>' cannot add alternate: reference repository
'<snip>' is shallow
When a alternate computed from the superproject's alternate cannot be
added, whether in this case or another, advise about configuring the
"submodule.alternateErrorStrategy" configuration option and using
"--reference-if-able" instead of "--reference" when cloning.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config/advice.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt index 6aaa360202..d4e698cd3f 100644 --- a/Documentation/config/advice.txt +++ b/Documentation/config/advice.txt @@ -107,4 +107,7 @@ advice.*:: editor input from the user. nestedTag:: Advice shown if a user attempts to recursively tag a tag object. + submoduleAlternateErrorStrategyDie: + Advice shown when a submodule.alternateErrorStrategy option + configured to "die" causes a fatal error. -- |