113
}
114
115
/* the result should be freed by the caller. */
116
-static char *get_submodule_displaypath(const char *path, const char *prefix)
116
+static char *get_submodule_displaypath(const char *path, const char *prefix,
117
+ const char *super_prefix)
118
{
118
- const char *super_prefix = get_super_prefix();
119
-
119
if (prefix && super_prefix) {
120
BUG("cannot have prefix '%s' and superprefix '%s'",
121
prefix, super_prefix);
293
struct child_process cp = CHILD_PROCESS_INIT;
294
char *displaypath;
295
297
- displaypath = get_submodule_displaypath(path, info->prefix);
296
+ displaypath = get_submodule_displaypath(path, info->prefix,
297
+ get_super_prefix());
298
299
sub = submodule_from_path(the_repository, null_oid(), path);
300
447
const char *upd;
448
char *url = NULL, *displaypath;
449
450
- displaypath = get_submodule_displaypath(path, prefix);
450
+ displaypath = get_submodule_displaypath(path, prefix,
451
+ get_super_prefix());
452
453
sub = submodule_from_path(the_repository, null_oid(), path);
454
625
die(_("no submodule mapping found in .gitmodules for path '%s'"),
626
path);
627
627
- displaypath = get_submodule_displaypath(path, prefix);
628
+ displaypath = get_submodule_displaypath(path, prefix,
629
+ get_super_prefix());
630
631
if ((CE_STAGEMASK & ce_flags) >> CE_STAGESHIFT) {
632
print_status(flags, 'U', path, null_oid(), displaypath);
950
dst_abbrev = xstrndup(oid_to_hex(&p->oid_dst), 7);
951
}
952
951
- displaypath = get_submodule_displaypath(p->sm_path, info->prefix);
953
+ displaypath = get_submodule_displaypath(p->sm_path, info->prefix,
954
+ get_super_prefix());
955
956
if (!missing_src && !missing_dst) {
957
struct child_process cp_rev_list = CHILD_PROCESS_INIT;
1242
super_config_url = xstrdup("");
1243
}
1244
1242
- displaypath = get_submodule_displaypath(path, prefix);
1245
+ displaypath = get_submodule_displaypath(path, prefix,
1246
+ get_super_prefix());
1247
1248
if (!(flags & OPT_QUIET))
1249
printf(_("Synchronizing submodule url for '%s'\n"),
1369
if (!sub || !sub->name)
1370
goto cleanup;
1371
1368
- displaypath = get_submodule_displaypath(path, prefix);
1372
+ displaypath = get_submodule_displaypath(path, prefix, NULL);
1373
1374
/* remove the submodule work tree (unless the user already did it) */
1375
if (is_directory(path)) {
1383
".git file by using absorbgitdirs."),
1384
displaypath);
1385
1382
- absorb_git_dir_into_superproject(path);
1386
+ absorb_git_dir_into_superproject(path, NULL);
1387
1388
}
1389
1962
enum submodule_update_type update_type;
1963
char *key;
1964
const struct update_data *ud = suc->update_data;
1961
- char *displaypath = get_submodule_displaypath(ce->name, ud->prefix);
1965
+ char *displaypath = get_submodule_displaypath(ce->name, ud->prefix,
1966
+ get_super_prefix());
1967
struct strbuf sb = STRBUF_INIT;
1968
int needs_cloning = 0;
1969
int need_free_url = 0;
2613
goto fail;
2614
2615
update_data->displaypath = get_submodule_displaypath(
2611
- update_data->sm_path, update_data->prefix);
2616
+ update_data->sm_path, update_data->prefix,
2617
+ get_super_prefix());
2618
code = update_submodule(update_data);
2619
FREE_AND_NULL(update_data->displaypath);
2620
fail:
2834
int i;
2835
struct pathspec pathspec = { 0 };
2836
struct module_list list = MODULE_LIST_INIT;
2837
+ const char *super_prefix;
2838
struct option embed_gitdir_options[] = {
2839
OPT_END()
2840
};
2850
if (module_list_compute(argv, prefix, &pathspec, &list) < 0)
2851
goto cleanup;
2852
2853
+ super_prefix = get_super_prefix();
2854
for (i = 0; i < list.nr; i++)
2847
- absorb_git_dir_into_superproject(list.entries[i]->name);
2855
+ absorb_git_dir_into_superproject(list.entries[i]->name,
2856
+ super_prefix);
2857
2858
ret = 0;
2859
cleanup: