]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/submodule--helper.c
object-name.h: move declarations for object-name.c functions from cache.h
[thirdparty/git.git] / builtin / submodule--helper.c
index 4c173d8b37adfc72ec840fd88ca27e36f432aef3..1f087d7bed2dfb9a82d80774337cd977a9af0e1f 100644 (file)
@@ -1,5 +1,10 @@
 #define USE_THE_INDEX_VARIABLE
 #include "builtin.h"
+#include "abspath.h"
+#include "alloc.h"
+#include "environment.h"
+#include "gettext.h"
+#include "hex.h"
 #include "repository.h"
 #include "cache.h"
 #include "config.h"
@@ -7,6 +12,7 @@
 #include "quote.h"
 #include "pathspec.h"
 #include "dir.h"
+#include "setup.h"
 #include "submodule.h"
 #include "submodule-config.h"
 #include "string-list.h"
@@ -18,6 +24,7 @@
 #include "revision.h"
 #include "diffcore.h"
 #include "diff.h"
+#include "object-name.h"
 #include "object-store.h"
 #include "advice.h"
 #include "branch.h"
@@ -1108,7 +1115,7 @@ static int compute_summary_module_list(struct object_id *head_oid,
                strvec_pushv(&diff_args, info->argv);
 
        git_config(git_diff_basic_config, NULL);
-       init_revisions(&rev, info->prefix);
+       repo_init_revisions(the_repository, &rev, info->prefix);
        rev.abbrev = 0;
        precompose_argv_prefix(diff_args.nr, diff_args.v, NULL);
        setup_revisions(diff_args.nr, diff_args.v, &rev, &opt);
@@ -1174,7 +1181,7 @@ static int module_summary(int argc, const char **argv, const char *prefix)
        if (!summary_limit)
                return 0;
 
-       if (!get_oid(argc ? argv[0] : "HEAD", &head_oid)) {
+       if (!repo_get_oid(the_repository, argc ? argv[0] : "HEAD", &head_oid)) {
                if (argc) {
                        argv++;
                        argc--;
@@ -1187,7 +1194,7 @@ static int module_summary(int argc, const char **argv, const char *prefix)
                        argc--;
                }
        } else {
-               if (get_oid("HEAD", &head_oid))
+               if (repo_get_oid(the_repository, "HEAD", &head_oid))
                        die(_("could not fetch a revision for HEAD"));
        }
 
@@ -2132,9 +2139,9 @@ static int update_clone_get_next_task(struct child_process *child,
        return 0;
 }
 
-static int update_clone_start_failure(struct strbuf *err,
+static int update_clone_start_failure(struct strbuf *err UNUSED,
                                      void *suc_cb,
-                                     void *idx_task_cb)
+                                     void *idx_task_cb UNUSED)
 {
        struct submodule_update_clone *suc = suc_cb;