78
int ret;
79
80
if (repo_submodule_init(&subrepo, the_repository, module_path,
81
- null_oid()) < 0)
81
+ null_oid(the_hash_algo)) < 0)
82
return die_message(_("could not get a repository handle for submodule '%s'"),
83
module_path);
84
ret = repo_get_default_remote(&subrepo, default_remote);
308
displaypath = get_submodule_displaypath(path, info->prefix,
309
info->super_prefix);
310
311
- sub = submodule_from_path(the_repository, null_oid(), path);
311
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
312
313
if (!sub)
314
die(_("No url found for submodule path '%s' in .gitmodules"),
468
469
displaypath = get_submodule_displaypath(path, prefix, super_prefix);
470
471
- sub = submodule_from_path(the_repository, null_oid(), path);
471
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
472
473
if (!sub)
474
die(_("No url found for submodule path '%s' in .gitmodules"),
645
if (validate_submodule_path(path) < 0)
646
exit(128);
647
648
- if (!submodule_from_path(the_repository, null_oid(), path))
648
+ if (!submodule_from_path(the_repository, null_oid(the_hash_algo), path))
649
die(_("no submodule mapping found in .gitmodules for path '%s'"),
650
path);
651
652
displaypath = get_submodule_displaypath(path, prefix, super_prefix);
653
654
if ((CE_STAGEMASK & ce_flags) >> CE_STAGESHIFT) {
655
- print_status(flags, 'U', path, null_oid(), displaypath);
655
+ print_status(flags, 'U', path, null_oid(the_hash_algo), displaypath);
656
goto cleanup;
657
}
658
912
struct strbuf errmsg = STRBUF_INIT;
913
int total_commits = -1;
914
915
- if (!info->cached && oideq(&p->oid_dst, null_oid())) {
915
+ if (!info->cached && oideq(&p->oid_dst, null_oid(the_hash_algo))) {
916
if (S_ISGITLINK(p->mod_dst)) {
917
struct ref_store *refs = repo_get_submodule_ref_store(the_repository,
918
p->sm_path);
1051
1052
if (info->for_status && p->status != 'A' &&
1053
(sub = submodule_from_path(the_repository,
1054
- null_oid(), p->sm_path))) {
1054
+ null_oid(the_hash_algo), p->sm_path))) {
1055
char *config_key = NULL;
1056
const char *value;
1057
int ignore_all = 0;
1259
if (validate_submodule_path(path) < 0)
1260
exit(128);
1261
1262
- sub = submodule_from_path(the_repository, null_oid(), path);
1262
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
1263
1264
if (sub && sub->url) {
1265
if (starts_with_dot_dot_slash(sub->url) ||
1404
if (validate_submodule_path(path) < 0)
1405
exit(128);
1406
1407
- sub = submodule_from_path(the_repository, null_oid(), path);
1407
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
1408
1409
if (!sub || !sub->name)
1410
goto cleanup;
1929
enum submodule_update_type update,
1930
struct submodule_update_strategy *out)
1931
{
1932
- const struct submodule *sub = submodule_from_path(r, null_oid(), path);
1932
+ const struct submodule *sub = submodule_from_path(r, null_oid(the_hash_algo), path);
1933
char *key;
1934
const char *val;
1935
int ret;
2089
goto cleanup;
2090
}
2091
2092
- sub = submodule_from_path(the_repository, null_oid(), ce->name);
2092
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), ce->name);
2093
2094
if (!sub) {
2095
next_submodule_warn_missing(suc, out, displaypath);
2485
char *key;
2486
*branch = NULL;
2487
2488
- sub = submodule_from_path(the_repository, null_oid(), path);
2488
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
2489
if (!sub)
2490
return die_message(_("could not initialize submodule at path '%s'"),
2491
path);
2531
const char *cw;
2532
struct repository subrepo;
2533
2534
- if (repo_submodule_init(&subrepo, the_repository, path, null_oid()))
2534
+ if (repo_submodule_init(&subrepo, the_repository, path, null_oid(the_hash_algo)))
2535
return die_message(_("could not get a repository handle for submodule '%s'"),
2536
path);
2537
2644
return ret;
2645
2646
if (update_data->just_cloned)
2647
- oidcpy(&update_data->suboid, null_oid());
2647
+ oidcpy(&update_data->suboid, null_oid(the_hash_algo));
2648
else if (repo_resolve_gitlink_ref(the_repository, update_data->sm_path,
2649
"HEAD", &update_data->suboid))
2650
return die_message(_("Unable to find current revision in submodule path '%s'"),
2697
struct update_data next = *update_data;
2698
2699
next.prefix = NULL;
2700
- oidcpy(&next.oid, null_oid());
2701
- oidcpy(&next.suboid, null_oid());
2700
+ oidcpy(&next.oid, null_oid(the_hash_algo));
2701
+ oidcpy(&next.suboid, null_oid(the_hash_algo));
2702
2703
cp.dir = update_data->sm_path;
2704
cp.git_cmd = 1;
3057
if (argc != 2 || !(path = argv[0]) || !(newurl = argv[1]))
3058
usage_with_options(usage, options);
3059
3060
- sub = submodule_from_path(the_repository, null_oid(), path);
3060
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
3061
3062
if (!sub)
3063
die(_("no submodule mapping found in .gitmodules for path '%s'"),
3113
if (argc != 1 || !(path = argv[0]))
3114
usage_with_options(usage, options);
3115
3116
- sub = submodule_from_path(the_repository, null_oid(), path);
3116
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
3117
3118
if (!sub)
3119
die(_("no submodule mapping found in .gitmodules for path '%s'"),