list mirror (unofficial, one of many)
 help / color / Atom feed
From: Jonathan Tan <>
Cc: Jonathan Tan <>
Subject: [PATCH 1/2] Doc: explain submodule.alternateErrorStrategy
Date: Mon, 25 Nov 2019 17:30:59 -0800
Message-ID: <> (raw)
In-Reply-To: <>

Commit 31224cbdc7 ("clone: recursive and reference option triggers
submodule alternates", 2016-08-17) taught Git to support the
configuration options "submodule.alternateLocation" and
"submodule.alternateErrorStrategy" on a superproject.

If "submodule.alternateLocation" is configured to "superproject" on a
superproject, whenever a submodule of that superproject is cloned, it
instead computes the analogous alternate path for that submodule from
$GIT_DIR/objects/info/alternates of the superproject, and references it.

The "submodule.alternateErrorStrategy" option determines what happens
if that alternate cannot be referenced. However, it is not clear that
the clone proceeds as if no alternate was specified when that option is
not set to "die" (as can be seen in the tests in 31224cbdc7). Therefore,
document it accordingly.

Signed-off-by: Jonathan Tan <>
When I said "not clear" above, I mean that it is not clear *to me*, and
I assume that others will feel the same way. Feel free to drop this from
the patch set if the existing documentation is clear to most people.
 Documentation/config/submodule.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/config/submodule.txt b/Documentation/config/submodule.txt
index 0a1293b051..b33177151c 100644
--- a/Documentation/config/submodule.txt
+++ b/Documentation/config/submodule.txt
@@ -79,4 +79,6 @@ submodule.alternateLocation::
 	Specifies how to treat errors with the alternates for a submodule
 	as computed via `submodule.alternateLocation`. Possible values are
-	`ignore`, `info`, `die`. Default is `die`.
+	`ignore`, `info`, `die`. Default is `die`. Note that if set to `ignore`
+	or `info`, and if there is an error with the computed alternate, the
+	clone proceeds as if no alternate was specified.

  reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  1:30 [PATCH 0/2] Advice upon clone --recurse-submodules --reference Jonathan Tan
2019-11-26  1:30 ` Jonathan Tan [this message]
2019-11-27 11:32   ` [PATCH 1/2] Doc: explain submodule.alternateErrorStrategy Jeff King
2019-11-27 12:30   ` Junio C Hamano
2019-11-26  1:31 ` [PATCH 2/2] submodule--helper: advise on fatal alternate error Jonathan Tan
2019-11-27 11:49   ` Jeff King
2019-12-02 19:57 ` [PATCH v2 0/2] Advice upon clone --recurse-submodules --reference Jonathan Tan
2019-12-02 19:57   ` [PATCH v2 1/2] Doc: explain submodule.alternateErrorStrategy Jonathan Tan
2019-12-02 19:57   ` [PATCH v2 2/2] submodule--helper: advise on fatal alternate error Jonathan Tan
2019-12-03 15:39   ` [PATCH v2 0/2] Advice upon clone --recurse-submodules --reference Jeff King
2019-12-03 16:50     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:

 note: .onion URLs require Tor:

AGPL code for this site: git clone