*/
validate_no_submodules(wt);
- strvec_pushf(&child_env, "%s=%s/.git",
+ child_process_init(&cp);
- argv_array_pushf(&cp.env_array, "%s=%s/.git",
- GIT_DIR_ENVIRONMENT, wt->path);
- argv_array_pushf(&cp.env_array, "%s=%s",
- GIT_WORK_TREE_ENVIRONMENT, wt->path);
- argv_array_pushl(&cp.args, "status",
- "--porcelain", "--ignore-submodules=none",
- NULL);
++ strvec_pushf(&cp.env_array, "%s=%s/.git",
+ GIT_DIR_ENVIRONMENT, wt->path);
- strvec_pushf(&child_env, "%s=%s",
++ strvec_pushf(&cp.env_array, "%s=%s",
+ GIT_WORK_TREE_ENVIRONMENT, wt->path);
- memset(&cp, 0, sizeof(cp));
+ strvec_pushl(&cp.args, "status",
+ "--porcelain", "--ignore-submodules=none",
+ NULL);
- cp.env = child_env.v;
cp.git_cmd = 1;
cp.dir = wt->path;
cp.out = -1;