Skip to content

Commit 10c64a0

Browse files
jonathantanmygitster
authored andcommitted
Doc: explain submodule.alternateErrorStrategy
Commit 31224cb ("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 31224cb). Therefore, document it accordingly. Signed-off-by: Jonathan Tan <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d9f6f3b commit 10c64a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/config/submodule.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,6 @@ submodule.alternateLocation::
7979
submodule.alternateErrorStrategy::
8080
Specifies how to treat errors with the alternates for a submodule
8181
as computed via `submodule.alternateLocation`. Possible values are
82-
`ignore`, `info`, `die`. Default is `die`.
82+
`ignore`, `info`, `die`. Default is `die`. Note that if set to `ignore`
83+
or `info`, and if there is an error with the computed alternate, the
84+
clone proceeds as if no alternate was specified.

0 commit comments

Comments
 (0)