All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] Doc: explain submodule.alternateErrorStrategy
Date: Wed, 27 Nov 2019 21:30:39 +0900	[thread overview]
Message-ID: <xmqqo8wxv6vk.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: a8125b946227d918865fde0dcbec516474b42386.1574731649.git.jonathantanmy@google.com

Jonathan Tan <jonathantanmy@google.com> writes:

> 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.
> ...
> 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.

Given that for everyday use (cf. sha1-file.c::link_alt_odb_entry())
of an alternate is best-effort basis, I have a feeling that it was a
design mistake to have the "error strategy" configuration option in
the first place, and "clone --reference-if-able" was the result of
the same design mistake.  We would have been better off if we made
these the best-effort features as well.

But the ship has sailed long ago---so I think these two are the best
we can do at this point.  Perhaps flipping the default to warn may
be a longer term improvement, too.

  parent reply	other threads:[~2019-11-27 12:30 UTC|newest]

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 ` [PATCH 1/2] Doc: explain submodule.alternateErrorStrategy Jonathan Tan
2019-11-27 11:32   ` Jeff King
2019-11-27 12:30   ` Junio C Hamano [this message]
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=xmqqo8wxv6vk.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.