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

Re: [PATCH v2] submodule: teach set-url subcommand

From
Danh Doan <congdanhqx@gmail.com>
Date
Oct 29, 2019, 09:15 UTC
Message-ID
<20191029091538.GB17223@danh.dev>
In-Reply-To
<d8841c6009c91ac921d30b35ed9a441c87b332e2.1572337964.git.liu.denton@gmail.com>
On 2019-10-29 01:34:19 -0700, Denton Liu wrote:
Show 9 quoted lines
> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index 1f46380af2..f1c4689f24 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -16,6 +16,7 @@ SYNOPSIS
>  'git submodule' [--quiet] deinit [-f|--force] (--all|[--] <path>...)
>  'git submodule' [--quiet] update [<options>] [--] [<path>...]
>  'git submodule' [--quiet] set-branch [<options>] [--] <path>
> +'git submodule' [--quiet] set-url [<options>] [--] <path> <newurl>

I skimmed over this patch and found no options. [<options>] should be removed

Show 30 quoted lines
> @@ -180,6 +181,11 @@ set-branch (-d|--default) [--] <path>::
>  	`--default` option removes the submodule.<name>.branch configuration
>  	key, which causes the tracking branch to default to 'master'.
>  
> +set-url [--] <path> <newurl>::
> +	Sets the URL of the specified submodule to <newurl>. Then, it will
> +	automatically synchronize the submodule's new remote URL
> +	configuration.
> +
>  summary [--cached|--files] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]::
>  	Show commit summary between the given commit (defaults to HEAD) and
>  	working tree/index. For a submodule in question, a series of commits
> diff --git a/git-submodule.sh b/git-submodule.sh
> index c7f58c5756..f7374ddbd6 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -12,6 +12,7 @@ USAGE="[--quiet] [--cached]
>     or: $dashless [--quiet] deinit [-f|--force] (--all| [--] <path>...)
>     or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]
>     or: $dashless [--quiet] set-branch (--default|--branch <branch>) [--] <path>
> +   or: $dashless [--quiet] set-url [--] <path> <newurl>
>     or: $dashless [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
>     or: $dashless [--quiet] foreach [--recursive] <command>
>     or: $dashless [--quiet] sync [--recursive] [--] [<path>...]
> diff --git a/t/t7420-submodule-set-url.sh b/t/t7420-submodule-set-url.sh
> new file mode 100755
> index 0000000000..9bc941ced3
> --- /dev/null
> +++ b/t/t7420-submodule-set-url.sh
> +		grep "url = \.\./newsubmodule" .gitmodules &&

grep -F "url = ../newsubmodule" will be easier to read.

-- 
Danh
Previous: Denton LiuNext: Denton Liu
Message 3 of 7 in “submodule: teach set-url subcommand”
  1. submodule: teach set-url subcommandDenton Liu, Sep 17, 2019
  2. submodule: teach set-url subcommandDenton Liu, Oct 29, 2019
  3. Danh DoanOct 29, 2019
  4. submodule: teach set-url subcommandDenton Liu, Oct 29, 2019
  5. Junio C HamanoOct 30, 2019
  6. Denton LiuOct 30, 2019
  7. Junio C HamanoNov 2, 2019

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.