git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Doc: explain submodule.alternateErrorStrategy

From
Jeff King <peff@peff.net>
Date
Nov 27, 2019, 11:32 UTC
Message-ID
<20191127113244.GC22221@sigill.intra.peff.net>
In-Reply-To
<a8125b946227d918865fde0dcbec516474b42386.1574731649.git.jonathantanmy@google.com>
On Mon, Nov 25, 2019 at 05:30:59PM -0800, Jonathan Tan wrote:
Show 21 quoted lines
> 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 <jonathantanmy@google.com>
> ---
> 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.

FWIW, I learned about these options for the first time from your email, and I think the suggested change makes the behavior much more clear.

-Peff
Previous: Jonathan TanNext: Junio C Hamano
Message 3 of 11 in “Advice upon clone --recurse-submodules --reference”
  1. 0/2 Advice upon clone --recurse-submodules --referenceJonathan Tan, Nov 26, 2019
  2. 1/2 Doc: explain submodule.alternateErrorStrategyJonathan Tan, Nov 26, 2019
  3. Jeff KingNov 27, 2019
  4. Junio C HamanoNov 27, 2019
  5. 2/2 submodule--helper: advise on fatal alternate errorJonathan Tan, Nov 26, 2019
  6. Jeff KingNov 27, 2019
  7. 0/2 Advice upon clone --recurse-submodules --referenceJonathan Tan, Dec 2, 2019
  8. 1/2 Doc: explain submodule.alternateErrorStrategyJonathan Tan, Dec 2, 2019
  9. 2/2 submodule--helper: advise on fatal alternate errorJonathan Tan, Dec 2, 2019
  10. Jeff KingDec 3, 2019
  11. Junio C HamanoDec 3, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.