]> git.ipfire.org Git - thirdparty/git.git/blobdiff - submodule-config.c
object-name.h: move declarations for object-name.c functions from cache.h
[thirdparty/git.git] / submodule-config.c
index 89a7bf0a93dd176d0d6f8e92bc84287484483428..252b90aa439c9014b1bbb3b0e641201d998def9c 100644 (file)
@@ -1,12 +1,15 @@
 #include "cache.h"
 #include "alloc.h"
 #include "dir.h"
+#include "environment.h"
+#include "gettext.h"
 #include "hex.h"
 #include "repository.h"
 #include "config.h"
 #include "submodule-config.h"
 #include "submodule.h"
 #include "strbuf.h"
+#include "object-name.h"
 #include "object-store.h"
 #include "parse-options.h"
 #include "tree-walk.h"
@@ -537,7 +540,7 @@ static int gitmodule_oid_from_commit(const struct object_id *treeish_name,
        }
 
        strbuf_addf(rev, "%s:.gitmodules", oid_to_hex(treeish_name));
-       if (get_oid(rev->buf, gitmodules_oid) >= 0)
+       if (repo_get_oid(the_repository, rev->buf, gitmodules_oid) >= 0)
                ret = 1;
 
        return ret;
@@ -590,7 +593,8 @@ static const struct submodule *config_from(struct submodule_cache *cache,
        if (submodule)
                goto out;
 
-       config = read_object_file(&oid, &type, &config_size);
+       config = repo_read_object_file(the_repository, &oid, &type,
+                                      &config_size);
        if (!config || type != OBJ_BLOB)
                goto out;