From: Junio C Hamano <gitster@pobox.com>
To: Petar Vutov <pvutov@imap.cc>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v3 1/1] docs: highlight that .gitmodules does not support !command
Date: Tue, 25 Jul 2023 11:17:33 -0700 [thread overview]
Message-ID: <xmqq8rb3n9du.fsf@gitster.g> (raw)
In-Reply-To: <0d29ac42-4e8f-71b6-b85f-00de182e2957@imap.cc> (Petar Vutov's message of "Sat, 15 Jul 2023 00:03:31 +0200")
Petar Vutov <pvutov@imap.cc> writes:
> I applied your patch and then made some additions, which I'll append
> at the end of this message. Summary:
>
> * Added your rewrite from yesterday. I like that it's more precise
> than the current docs, but I struggle with the complexity of the
> first sentence. I wanted to make it easier to follow by splitting it
> in two somehow. Instead I ended up with an introductory sentence
> summarizing the functionality with small words.
>
> * In gitmodules.txt, moved the security disclaimer so people are more
> likely to see it before they follow the link to git-submodule.txt.
>
> * Explicitly called out `none` and `custom command` as being unusable
> on the command line (and in .gitmodules). I expect that you won't
> want that .gitmodules mention anymore, but I left it in for now, up
> to you.
>
> The diff below is based on top of your patch from yesterday, since I
> assume that you don't want to look at a mishmash of both patches.
Sorry for a very slow response; I seem to have missed this one.
The end result looks good. Care to wrap it up into a single patch
(iow, make a "mishmash of both patches") with a good log message so
we can move the topic forward?
Thanks.
> diff --git a/Documentation/git-submodule.txt
> b/Documentation/git-submodule.txt
> index 5248840b18..695730609a 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -165,13 +165,18 @@ checked out in the submodule.
> merge;; the commit recorded in the superproject will be merged
> into the current branch in the submodule.
>
> - custom command;; arbitrary shell command that takes a single
> - argument (the sha1 of the commit recorded in the
> - superproject) is executed. When `submodule.<name>.update`
> - is set to '!command', the remainder after the exclamation mark
> - is the custom command.
> -
> - none;; the submodule is not updated.
> +The following update procedures have additional limitations:
> +
> + custom command;; mechanism for running arbitrary commands with the
> + commit ID as an argument. Specifically, if the
> + `submodule.<name>.update` configuration variable is set to
> + `!custom command`, the object name of the commit recorded in the
> + superproject for the submodule is appended to the `custom command`
> + string and executed. Note that this mechanism is not supported in
> + the `.gitmodules` file or on the command line.
> +
> + none;; the submodule is not updated. This update procedure is not
> + allowed on the command line.
>
> If the submodule is not yet initialized, and you just want to use the
> setting as stored in `.gitmodules`, you can automatically initialize the
> diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
> index dcee09b500..d9bec8b187 100644
> --- a/Documentation/gitmodules.txt
> +++ b/Documentation/gitmodules.txt
> @@ -43,9 +43,9 @@ submodule.<name>.update::
> command in the superproject. This is only used by `git
> submodule init` to initialize the configuration variable of
> the same name. Allowed values here are 'checkout', 'rebase',
> - 'merge' or 'none'. See description of 'update' command in
> - linkgit:git-submodule[1] for their meaning. For security
> - reasons, the '!command' form is not accepted here.
> + 'merge' or 'none', but not '!command' (for security reasons).
> + See the description of the 'update' command in
> + linkgit:git-submodule[1] for more details.
>
> submodule.<name>.branch::
> A remote branch name for tracking updates in the upstream submodule.
next prev parent reply other threads:[~2023-07-25 18:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 16:02 [PATCH] doc: remove mentions of .gitmodules !command syntax pvutov
2023-07-12 16:40 ` Junio C Hamano
2023-07-12 17:30 ` Petar Vutov
2023-07-12 17:54 ` Junio C Hamano
2023-07-12 18:48 ` Petar Vutov
2023-07-12 20:33 ` Junio C Hamano
2023-07-13 19:20 ` Petar Vutov
2023-07-13 19:33 ` Junio C Hamano
2023-07-13 19:33 ` [PATCH v3 1/1] docs: highlight that .gitmodules does not support !command pvutov
2023-07-13 19:38 ` Junio C Hamano
2023-07-13 19:46 ` Petar Vutov
2023-07-13 19:55 ` Junio C Hamano
2023-07-13 20:34 ` Petar Vutov
2023-07-13 20:55 ` Junio C Hamano
2023-07-13 21:37 ` Junio C Hamano
2023-07-13 21:47 ` Petar Vutov
2023-07-13 22:28 ` Junio C Hamano
2023-07-14 22:03 ` Petar Vutov
2023-07-25 18:17 ` Junio C Hamano [this message]
2023-07-25 21:22 ` [PATCH v5] doc: " pvutov
2023-07-25 21:56 ` Junio C Hamano
2023-07-13 20:34 ` [PATCH v4] docs: " pvutov
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=xmqq8rb3n9du.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pvutov@imap.cc \
/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.