diff options
Diffstat (limited to 'submodule-config.c')
| -rw-r--r-- | submodule-config.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/submodule-config.c b/submodule-config.c index 8630e27947..70324da383 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -13,7 +13,7 @@ #include "submodule.h" #include "strbuf.h" #include "object-name.h" -#include "object-store.h" +#include "odb.h" #include "parse-options.h" #include "thread-utils.h" #include "tree-walk.h" @@ -235,18 +235,6 @@ in_component: return 0; } -static int starts_with_dot_slash(const char *const path) -{ - return path_match_flags(path, PATH_MATCH_STARTS_WITH_DOT_SLASH | - PATH_MATCH_XPLATFORM); -} - -static int starts_with_dot_dot_slash(const char *const path) -{ - return path_match_flags(path, PATH_MATCH_STARTS_WITH_DOT_DOT_SLASH | - PATH_MATCH_XPLATFORM); -} - static int submodule_url_is_relative(const char *url) { return starts_with_dot_slash(url) || starts_with_dot_dot_slash(url); @@ -743,8 +731,8 @@ static const struct submodule *config_from(struct submodule_cache *cache, if (submodule) goto out; - config = repo_read_object_file(the_repository, &oid, &type, - &config_size); + config = odb_read_object(the_repository->objects, &oid, + &type, &config_size); if (!config || type != OBJ_BLOB) goto out; @@ -810,7 +798,8 @@ static void config_from_gitmodules(config_fn_t fn, struct repository *repo, void repo_get_oid(repo, GITMODULES_HEAD, &oid) >= 0) { config_source.blob = oidstr = xstrdup(oid_to_hex(&oid)); if (repo != the_repository) - add_submodule_odb_by_path(repo->objects->odb->path); + odb_add_submodule_source_by_path(the_repository->objects, + repo->objects->sources->path); } else { goto out; } |
