From c9911c9358e611390e2444f718c73900d17d3d60 Mon Sep 17 00:00:00 2001 From: Glen Choo Date: Tue, 15 Mar 2022 14:09:22 -0700 Subject: submodule--helper: teach update_data more options Refactor 'struct update_data' to hold the parsed args needed by "git submodule--helper update" and refactor "update-clone" and "run-update-procedure" (the functions that will be combined to form "update") to use these options. For "run-update-procedure", 'struct update_data' already holds its args, so only arg parsing code needs to be updated. For "update-clone", move its args from 'struct submodule_update_clone' into 'struct update_data', and replace them with a pointer to 'struct update_data'. Its other members hold the submodule iteration state of "update-clone", so those are unchanged. Incidentally, since we reformat the designated initializers of the affected structs, also reformat MODULE_CLONE_DATA_INIT for consistency. Signed-off-by: Glen Choo Signed-off-by: Junio C Hamano --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-submodule.sh') diff --git a/git-submodule.sh b/git-submodule.sh index a84143daab..b63a2aefa7 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -366,7 +366,7 @@ cmd_update() ${update:+--update "$update"} \ ${reference:+"$reference"} \ ${dissociate:+"--dissociate"} \ - ${depth:+--depth "$depth"} \ + ${depth:+"$depth"} \ ${require_init:+--require-init} \ $single_branch \ $recommend_shallow \ -- cgit v1.2.3