git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Vadim Zeitlin <vadim@zeitlins.org>
Cc: git@vger.kernel.org,  "brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: Would it be possible to add an option to disable validating submodule paths?
Date: Wed, 08 Jan 2025 08:03:42 -0800	[thread overview]
Message-ID: <xmqqjzb5nvhd.fsf@gitster.g> (raw)
In-Reply-To: <Mahogany-0.68.0-2854301-20250108-005035.01@dark.tt-solutions.com> (Vadim Zeitlin's message of "Wed, 8 Jan 2025 00:50:35 +0100")

Vadim Zeitlin <vadim@zeitlins.org> writes:

> JCH> Sounds reasonable, but I wonder how this would interact with
> JCH> bootstrapping.  Should it be configured in ~/.gitconfig, possibly
> JCH> with [includeIf] to specify the directory you'd store a bunch of
> JCH> repositories you clone from outside, or something?  I guess "git
> JCH> clone" without "--recurse-submodules" is simple enough to be used
> JCH> for bootstrapping, and then the configuration can be set at the
> JCH> top-level superproject after cloning but before "submodule init".
>
>  I might be missing something here, but if the question is about whether we
> need to have any special support for this in git-clone itself, then I don't
> think so, it's a rather special use case and running git-clone without
> --recurse-submodules and initializing (some) submodules later while
> symlinking some other ones is only a minor inconvenience, if that.

If you say so then I'd stop worrying about it ;-)  I am not a heavy
submodule user myself.

The worry came primarily from the fact that this was reported as a
"we have been using submodules happily in this particular manner but
with a new version of Git it stopped working" regression.  Your
set-up was created with an older version of Git that did not have
the problematic "defence in depth".  If you or somebody else wanted
to recreate the same set-up from scratch, would "git clone" that is
unmodified, other than conditionally disables the check introduced
by the commit e8d06089 (submodule: require the submodule path to
contain directories only, 2024-03-26), let you do so?  Or would it
also need to honor the new configuration that conditionally disables
the check, and if so, how would we make sure it is read during "git
clone" (which has kind of special chicken-and-egg problem with
respect to configuration settings).

> ... Should it be something like
> submodule.validate instead, perhaps? Please let me know if anybody has any
> better ideas.

Is "it MUST NOT BE a symbolic link" the only thing the validation
does?  Would there be extra check on top of what is currently there
that may turn out to be useful?  If the answers are no and/or yes,
"submodule.validate=no" sounds like a reasonable choice, but I am
not good at naming, so we may want to hear ideas from others.

Thanks.


  reply	other threads:[~2025-01-08 16:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 22:00 Would it be possible to add an option to disable validating submodule paths? Vadim Zeitlin
2025-01-07 23:09 ` brian m. carlson
2025-01-07 23:25   ` Junio C Hamano
2025-01-07 23:50     ` Re[2]: " Vadim Zeitlin
2025-01-08 16:03       ` Junio C Hamano [this message]
2025-01-08 19:30         ` Vadim Zeitlin
2025-07-28 23:12           ` [PATCH] submodule: Add a config option to skip path validation Vadim Zeitlin

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=xmqqjzb5nvhd.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    --cc=vadim@zeitlins.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).