diff mbox series

[v7,19/20] fixup! submodule--helper run-update-procedure: learn --remote

Message ID 20220210092833.55360-20-chooglen@google.com (mailing list archive)
State New, archived
Headers show
Series submodule: convert the rest of 'update' to C | expand

Commit Message

Glen Choo Feb. 10, 2022, 9:28 a.m. UTC
Signed-off-by: Glen Choo <chooglen@google.com>
---
 builtin/submodule--helper.c | 19 -------------------
 1 file changed, 19 deletions(-)

Comments

Ævar Arnfjörð Bjarmason Feb. 12, 2022, 2:43 p.m. UTC | #1
On Thu, Feb 10 2022, Glen Choo wrote:

> Signed-off-by: Glen Choo <chooglen@google.com>
> ---
>  builtin/submodule--helper.c | 19 -------------------
>  1 file changed, 19 deletions(-)
>
> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
> index 98d8910930..5d5302b50b 100644
> --- a/builtin/submodule--helper.c
> +++ b/builtin/submodule--helper.c
> @@ -2516,23 +2516,6 @@ static const char *remote_submodule_branch(const char *path)
>  	return branch;
>  }
>  
> -static int resolve_remote_submodule_branch(int argc, const char **argv,
> -		const char *prefix)
> -{
> -	const char *ret;
> -	struct strbuf sb = STRBUF_INIT;
> -	if (argc != 2)
> -		die("submodule--helper remote-branch takes exactly one arguments, got %d", argc);
> -
> -	ret = remote_submodule_branch(argv[1]);
> -	if (!ret)
> -		die("submodule %s doesn't exist", argv[1]);
> -
> -	printf("%s", ret);
> -	strbuf_release(&sb);
> -	return 0;
> -}
> -
>  static int push_check(int argc, const char **argv, const char *prefix)
>  {
>  	struct remote *remote;
> @@ -3484,8 +3467,6 @@ static struct cmd_struct commands[] = {
>  	{"sync", module_sync, SUPPORT_SUPER_PREFIX},
>  	{"deinit", module_deinit, 0},
>  	{"summary", module_summary, SUPPORT_SUPER_PREFIX},
> -	/* NEEDSWORK: remote-branch is also obsolete */
> -	{"remote-branch", resolve_remote_submodule_branch, 0},
>  	{"push-check", push_check, 0},
>  	{"absorb-git-dirs", absorb_git_dirs, SUPPORT_SUPER_PREFIX},
>  	{"is-active", is_active, 0},

Ditto good fix-up, should squash this into the relevant commit.
diff mbox series

Patch

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 98d8910930..5d5302b50b 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -2516,23 +2516,6 @@  static const char *remote_submodule_branch(const char *path)
 	return branch;
 }
 
-static int resolve_remote_submodule_branch(int argc, const char **argv,
-		const char *prefix)
-{
-	const char *ret;
-	struct strbuf sb = STRBUF_INIT;
-	if (argc != 2)
-		die("submodule--helper remote-branch takes exactly one arguments, got %d", argc);
-
-	ret = remote_submodule_branch(argv[1]);
-	if (!ret)
-		die("submodule %s doesn't exist", argv[1]);
-
-	printf("%s", ret);
-	strbuf_release(&sb);
-	return 0;
-}
-
 static int push_check(int argc, const char **argv, const char *prefix)
 {
 	struct remote *remote;
@@ -3484,8 +3467,6 @@  static struct cmd_struct commands[] = {
 	{"sync", module_sync, SUPPORT_SUPER_PREFIX},
 	{"deinit", module_deinit, 0},
 	{"summary", module_summary, SUPPORT_SUPER_PREFIX},
-	/* NEEDSWORK: remote-branch is also obsolete */
-	{"remote-branch", resolve_remote_submodule_branch, 0},
 	{"push-check", push_check, 0},
 	{"absorb-git-dirs", absorb_git_dirs, SUPPORT_SUPER_PREFIX},
 	{"is-active", is_active, 0},