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

Re: [PATCH] submodule update: document exisiting -r form for --rebase

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 28, 2012, 19:02 UTC
Message-ID
<7vboehv9d6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<0450c75cbab3119ea830e8e8e3484649062377d8.1354127227.git.wking@tremily.us>
"W. Trevor King" <wking@tremily.us> writes:
Show 7 quoted lines
> From: "W. Trevor King" <wking@tremily.us>
>
> Signed-off-by: W. Trevor King <wking@tremily.us>
> ---
>  Documentation/git-submodule.txt | 3 ++-
>  git-submodule.sh                | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)

Hmm, I wonder why I have this funny feeling that this was proposed and rejected already...

As the command takes other options whose names begin with 'r', I thought the longer term plan was to stop letting "--rebase" squat on short and sweet "-r" and leaving it undocumented (even though the short one was added by mistake) was meant to be the first step in that process.

But maybe I am confusing an undocumented single-letter option from some other subcommand. Anybody remembers?

Show 34 quoted lines
> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index b4683bb..ec78fa7 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -13,7 +13,7 @@ SYNOPSIS
>  	      [--reference <repository>] [--] <repository> [<path>]
>  'git submodule' [--quiet] status [--cached] [--recursive] [--] [<path>...]
>  'git submodule' [--quiet] init [--] [<path>...]
> -'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]
> +'git submodule' [--quiet] update [--init] [-N|--no-fetch] [-r|--rebase]
>  	      [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
>  'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
>  	      [commit] [--] [<path>...]
> @@ -251,6 +251,7 @@ OPTIONS
>  	If the key `submodule.$name.update` is set to `merge`, this option is
>  	implicit.
>  
> +-r::
>  --rebase::
>  	This option is only valid for the update command.
>  	Rebase the current branch onto the commit recorded in the
> diff --git a/git-submodule.sh b/git-submodule.sh
> index ab6b110..f2e8026 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -8,7 +8,7 @@ dashless=$(basename "$0" | sed -e 's/-/ /')
>  USAGE="[--quiet] add [-b branch] [-f|--force] [--reference <repository>] [--] <repository> [<path>]
>     or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]
>     or: $dashless [--quiet] init [--] [<path>...]
> -   or: $dashless [--quiet] update [--init] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
> +   or: $dashless [--quiet] update [--init] [-N|--no-fetch] [-f|--force] [-r|--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
>     or: $dashless [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
>     or: $dashless [--quiet] foreach [--recursive] <command>
>     or: $dashless [--quiet] sync [--] [<path>...]"
Previous: W. Trevor KingNext: W. Trevor King
Message 2 of 4 in “submodule update: document exisiting -r form for --rebase”
  1. submodule update: document exisiting -r form for --rebaseW. Trevor King, Nov 28, 2012
  2. Junio C HamanoNov 28, 2012
  3. W. Trevor KingNov 28, 2012
  4. Junio C HamanoNov 28, 2012

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.