submodule-config.c: use repo_get_oid for reading .gitmodules
[gitweb.git] / t / helper / test-submodule-config.c
index 5c6e4b010d61d2076f08e7077aa5ccbe6db665fc..e2692746dfdb0e6a5c3b1c748124059bcbdd5fae 100644 (file)
@@ -49,9 +49,11 @@ int cmd__submodule_config(int argc, const char **argv)
                        die_usage(argc, argv, "Commit not found.");
 
                if (lookup_name) {
-                       submodule = submodule_from_name(&commit_oid, path_or_name);
+                       submodule = submodule_from_name(the_repository,
+                                                       &commit_oid, path_or_name);
                } else
-                       submodule = submodule_from_path(&commit_oid, path_or_name);
+                       submodule = submodule_from_path(the_repository,
+                                                       &commit_oid, path_or_name);
                if (!submodule)
                        die_usage(argc, argv, "Submodule not found.");
 
@@ -65,7 +67,7 @@ int cmd__submodule_config(int argc, const char **argv)
                arg += 2;
        }
 
-       submodule_free();
+       submodule_free(the_repository);
 
        return 0;
 }