summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/submodule.c b/submodule.c
index 0530e8cf24..ead3fb5dad 100644
--- a/submodule.c
+++ b/submodule.c
@@ -27,7 +27,7 @@
#include "parse-options.h"
#include "object-file.h"
#include "object-name.h"
-#include "object-store-ll.h"
+#include "object-store.h"
#include "commit-reach.h"
#include "read-cache-ll.h"
#include "setup.h"
@@ -124,7 +124,7 @@ int update_path_in_gitmodules(const char *oldpath, const char *newpath)
if (is_gitmodules_unmerged(the_repository->index))
die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
- submodule = submodule_from_path(the_repository, null_oid(), oldpath);
+ submodule = submodule_from_path(the_repository, null_oid(the_hash_algo), oldpath);
if (!submodule || !submodule->name) {
warning(_("Could not find section in .gitmodules where path=%s"), oldpath);
return -1;
@@ -153,7 +153,7 @@ int remove_path_from_gitmodules(const char *path)
if (is_gitmodules_unmerged(the_repository->index))
die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first"));
- submodule = submodule_from_path(the_repository, null_oid(), path);
+ submodule = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
if (!submodule || !submodule->name) {
warning(_("Could not find section in .gitmodules where path=%s"), path);
return -1;
@@ -204,7 +204,7 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
const char *path)
{
const struct submodule *submodule = submodule_from_path(the_repository,
- null_oid(),
+ null_oid(the_hash_algo),
path);
if (submodule) {
const char *ignore;
@@ -312,7 +312,7 @@ int is_tree_submodule_active(struct repository *repo,
int is_submodule_active(struct repository *repo, const char *path)
{
- return is_tree_submodule_active(repo, null_oid(), path);
+ return is_tree_submodule_active(repo, null_oid(the_hash_algo), path);
}
int is_submodule_populated_gently(const char *path, int *return_error_code)
@@ -778,7 +778,7 @@ const struct submodule *submodule_from_ce(const struct cache_entry *ce)
if (!should_update_submodules())
return NULL;
- return submodule_from_path(the_repository, null_oid(), ce->name);
+ return submodule_from_path(the_repository, null_oid(the_hash_algo), ce->name);
}
@@ -1062,7 +1062,7 @@ static int submodule_needs_pushing(struct repository *r,
const char *path,
struct oid_array *commits)
{
- if (!submodule_has_commits(r, path, null_oid(), commits))
+ if (!submodule_has_commits(r, path, null_oid(the_hash_algo), commits))
/*
* NOTE: We do consider it safe to return "no" here. The
* correct answer would be "We do not know" instead of
@@ -1126,7 +1126,7 @@ int find_unpushed_submodules(struct repository *r,
const struct submodule *submodule;
const char *path = NULL;
- submodule = submodule_from_name(r, null_oid(), name->string);
+ submodule = submodule_from_name(r, null_oid(the_hash_algo), name->string);
if (submodule)
path = submodule->path;
else
@@ -1351,7 +1351,7 @@ static void calculate_changed_submodule_paths(struct repository *r,
const struct submodule *submodule;
const char *path = NULL;
- submodule = submodule_from_name(r, null_oid(), name->string);
+ submodule = submodule_from_name(r, null_oid(the_hash_algo), name->string);
if (submodule)
path = submodule->path;
else
@@ -1360,7 +1360,7 @@ static void calculate_changed_submodule_paths(struct repository *r,
if (!path)
continue;
- if (submodule_has_commits(r, path, null_oid(), &cs_data->new_commits)) {
+ if (submodule_has_commits(r, path, null_oid(the_hash_algo), &cs_data->new_commits)) {
changed_submodule_data_clear(cs_data);
*name->string = '\0';
}
@@ -1602,7 +1602,7 @@ get_fetch_task_from_index(struct submodule_parallel_fetch *spf,
if (!S_ISGITLINK(ce->ce_mode))
continue;
- task = fetch_task_create(spf, ce->name, null_oid());
+ task = fetch_task_create(spf, ce->name, null_oid(the_hash_algo));
if (!task)
continue;
@@ -2166,7 +2166,7 @@ int submodule_move_head(const char *path, const char *super_prefix,
if (old_head && !is_submodule_populated_gently(path, error_code_ptr))
return 0;
- sub = submodule_from_path(the_repository, null_oid(), path);
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
if (!sub)
BUG("could not get submodule information for '%s'", path);
@@ -2376,7 +2376,7 @@ static void relocate_single_git_dir_into_superproject(const char *path,
real_old_git_dir = real_pathdup(old_git_dir, 1);
- sub = submodule_from_path(the_repository, null_oid(), path);
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
if (!sub)
die(_("could not lookup name for submodule '%s'"), path);
@@ -2384,7 +2384,7 @@ static void relocate_single_git_dir_into_superproject(const char *path,
if (validate_submodule_git_dir(new_gitdir.buf, sub->name) < 0)
die(_("refusing to move '%s' into an existing git dir"),
real_old_git_dir);
- if (safe_create_leading_directories_const(new_gitdir.buf) < 0)
+ if (safe_create_leading_directories_const(the_repository, new_gitdir.buf) < 0)
die(_("could not create directory '%s'"), new_gitdir.buf);
real_new_git_dir = real_pathdup(new_gitdir.buf, 1);
@@ -2462,7 +2462,7 @@ void absorb_git_dir_into_superproject(const char *path,
* superproject did not rewrite the git file links yet,
* fix it now.
*/
- sub = submodule_from_path(the_repository, null_oid(), path);
+ sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
if (!sub)
die(_("could not lookup name for submodule '%s'"), path);
submodule_name_to_gitdir(&sub_gitdir, the_repository, sub->name);
@@ -2594,7 +2594,7 @@ int submodule_to_gitdir(struct repository *repo,
strbuf_addstr(buf, git_dir);
}
if (!is_git_directory(buf->buf)) {
- sub = submodule_from_path(repo, null_oid(), submodule);
+ sub = submodule_from_path(repo, null_oid(the_hash_algo), submodule);
if (!sub) {
ret = -1;
goto cleanup;