aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--builtin/submodule--helper.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 455e6766c3..811a08ead0 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -2464,19 +2464,11 @@ static void update_data_to_args(struct update_data *update_data, struct strvec *
static int update_submodule(struct update_data *update_data)
{
- char *prefixed_path;
-
ensure_core_worktree(update_data->sm_path);
- if (update_data->recursive_prefix)
- prefixed_path = xstrfmt("%s%s", update_data->recursive_prefix,
- update_data->sm_path);
- else
- prefixed_path = xstrdup(update_data->sm_path);
-
- update_data->displaypath = get_submodule_displaypath(prefixed_path,
- update_data->prefix);
- free(prefixed_path);
+ update_data->displaypath = do_get_submodule_displaypath(update_data->sm_path,
+ update_data->prefix,
+ update_data->recursive_prefix);
determine_submodule_update_strategy(the_repository, update_data->just_cloned,
update_data->sm_path, update_data->update_default,