MCPcopy Create free account
hub / github.com/git/git / absorb_git_dir_into_superproject_recurse

Function absorb_git_dir_into_superproject_recurse

submodule.c:2529–2549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2527}
2528
2529static void absorb_git_dir_into_superproject_recurse(const char *path,
2530 const char *super_prefix)
2531{
2532
2533 struct child_process cp = CHILD_PROCESS_INIT;
2534
2535 if (validate_submodule_path(path) < 0)
2536 exit(128);
2537
2538 cp.dir = path;
2539 cp.git_cmd = 1;
2540 cp.no_stdin = 1;
2541 strvec_pushl(&cp.args, "submodule--helper",
2542 "absorbgitdirs", NULL);
2543 strvec_pushf(&cp.args, "--super-prefix=%s%s/", super_prefix ?
2544 super_prefix : "", path);
2545
2546 prepare_submodule_repo_env(&cp.env);
2547 if (run_command(&cp))
2548 die(_("could not recurse into submodule '%s'"), path);
2549}
2550
2551/*
2552 * Migrate the git directory of the submodule given by path from

Callers 1

Calls 6

validate_submodule_pathFunction · 0.85
strvec_pushlFunction · 0.85
strvec_pushfFunction · 0.85
run_commandFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected