On 03/09, Stefan Beller wrote:
> +static void submodule_reset_index(const char *path)
> +{
> +     struct child_process cp = CHILD_PROCESS_INIT;
> +     prepare_submodule_repo_env_no_git_dir(&cp.env_array);
> +
> +     cp.git_cmd = 1;
> +     cp.no_stdin = 1;
> +     cp.dir = path;
> +
> +     argv_array_pushf(&cp.args, "--super-prefix=%s/", path);

What happens with nested submodules? As in can we reach this code path
with super_prefix already being set?  If so we would need to include
that as part of the super_prefix being passed to the child.  Just
looking for some clarification.

> +     argv_array_pushl(&cp.args, "read-tree", "-u", "--reset", NULL);
> +
> +     argv_array_push(&cp.args, EMPTY_TREE_SHA1_HEX);
> +
> +     if (run_command(&cp))
> +             die("could not reset submodule index");
> +}
> +

-- 
Brandon Williams

Reply via email to