All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michal Sojka <sojkam1@fel.cvut.cz>
Cc: git@vger.kernel.org, Jens.Lehmann@web.de
Subject: Re: [PATCH] submodule: Improve documentation of update subcommand
Date: Mon, 23 Feb 2015 12:13:20 -0800	[thread overview]
Message-ID: <xmqqvbiss7xb.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1424698360-10952-1-git-send-email-sojkam1@fel.cvut.cz> (Michal Sojka's message of "Mon, 23 Feb 2015 14:32:40 +0100")

Michal Sojka <sojkam1@fel.cvut.cz> writes:

> The documentation of 'git submodule update' has several problems:

Thanks, this round looks much better.

> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index ae6791d..fb2ae37 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -2411,12 +2411,17 @@ status.submodulesummary::
>  
>  submodule.<name>.path::
>  submodule.<name>.url::
> +	The path within this project and URL for a submodule. These
> +	variables are initially populated by 'git submodule init';
> +	edit them to override the URL and other values found in the
> +	`.gitmodules` file. See linkgit:git-submodule[1] and
> +	linkgit:gitmodules[5] for details.
> +

The sentence "edit them to override" talks about "other values",
which in the original wanted to cover not just "path" but "update"
as well.  By splitting 'update' into its own entry, "edit them to
override" is lost from 'update'.

But stepping back a bit, "edit them to override" applies to all
configuration variables.  The user edits the configuration file to
customize things.  I wonder if we even need to say this for .path
and url in the first place?

    Note: not a request to remove it because I hinted so, but a
    request for comments and discussion, as I do not have a firm
    opinion.

>  submodule.<name>.update::
> -	The path within this project, URL, and the updating strategy
> -	for a submodule.  These variables are initially populated
> -	by 'git submodule init'; edit them to override the
> -	URL and other values found in the `.gitmodules` file.  See
> -	linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
> +	The default updating strategy for a submodule. This variable
> +	is populated by `git submodule init` from the
> +	linkgit:gitmodules[5] file. See description of 'update'
> +	command in linkgit:git-submodule[1].




> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index 8e6af65..067d616 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -154,27 +154,51 @@ If `--force` is specified, the submodule's work tree will be removed even if
>  it contains local modifications.
>  
>  update::
> -	Update the registered submodules, i.e. clone missing submodules and
> -	checkout the commit specified in the index of the containing repository.
> -	This will make the submodules HEAD be detached unless `--rebase` or
> -	`--merge` is specified or the key `submodule.$name.update` is set to
> -	`rebase`, `merge` or `none`. `none` can be overridden by specifying
> -	`--checkout`. Setting the key `submodule.$name.update` to `!command`
> -	will cause `command` to be run. `command` can be any arbitrary shell
> -	command that takes a single argument, namely the sha1 to update to.
>  +
> +--
> +Update the registered submodules to match what the superproject
> +expects by cloning missing submodules and updating the working tree of
> +the submodules. The "updating" can be done in several ways depending
> +on command line options and the value of `submodule.<name>.update`
> +configuration variable. Supported update methods are:

If you read the description of "--remote" (sorry, I didn't notice it
until I formatted the result of this patch and tried to read the
whole thing), we already use "update procedure" to mean these modes
of updates collectively.  Either use "update procedures" here (and
everywhere else in this patch where it is called "update method"),
or adjust the existing "update procedure" to "update method".
Either way is fine, but because "update procedure" is not wrong
per-se, I think it would be better to use that phrasing that may
already be familiar with the "git submodule" users.

  reply	other threads:[~2015-02-23 20:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 10:09 [PATCH] submodule: Fix documentation of update subcommand Michal Sojka
2014-11-03 19:02 ` Junio C Hamano
2014-11-03 20:38   ` Jens Lehmann
2014-11-03 21:35     ` Junio C Hamano
2014-11-03 22:55       ` Michal Sojka
2014-11-03 23:08         ` Junio C Hamano
2014-11-04 20:22           ` Jens Lehmann
2014-11-04 20:56             ` Junio C Hamano
2014-11-03 20:53   ` Junio C Hamano
2014-11-03 20:58     ` Jens Lehmann
2015-02-17 22:45       ` Junio C Hamano
2015-02-18 22:48         ` [PATCH v2] " Michal Sojka
2015-02-18 23:44           ` Junio C Hamano
2015-02-19 17:54             ` Michal Sojka
2015-02-19 18:52               ` [PATCH v3] submodule: Improve " Michal Sojka
2015-02-20 23:31                 ` Junio C Hamano
2015-02-23 13:31                   ` Michal Sojka
2015-02-23 13:32                     ` [PATCH] " Michal Sojka
2015-02-23 20:13                       ` Junio C Hamano [this message]
2015-02-23 20:25                         ` Junio C Hamano
2015-03-02 22:39                         ` Michal Sojka
2015-03-02 22:42                           ` [PATCH v5] " Michal Sojka
2015-03-02 22:57                           ` [PATCH v6] " Michal Sojka
2015-03-02 23:05                             ` Junio C Hamano
2014-11-03 21:15     ` [PATCH] submodule: Fix " Michal Sojka

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=xmqqvbiss7xb.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=sojkam1@fel.cvut.cz \
    /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.