summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/submodule.c b/submodule.c
index 5bb7e7a033..9d5ec5f084 100644
--- a/submodule.c
+++ b/submodule.c
@@ -447,8 +447,8 @@ static void show_submodule_header(FILE *f, const char *path,
* Attempt to lookup the commit references, and determine if this is
* a fast forward or fast backwards update.
*/
- *left = lookup_commit_reference(one->hash);
- *right = lookup_commit_reference(two->hash);
+ *left = lookup_commit_reference(one);
+ *right = lookup_commit_reference(two);
/*
* Warn about missing commits in the submodule project, but only if
@@ -723,7 +723,7 @@ static int check_has_commit(const struct object_id *oid, void *data)
{
int *has_commit = data;
- if (!lookup_commit_reference(oid->hash))
+ if (!lookup_commit_reference(oid))
*has_commit = 0;
return 0;
@@ -1584,9 +1584,9 @@ static void print_commit(struct commit *commit)
#define MERGE_WARNING(path, msg) \
warning("Failed to merge submodule %s (%s)", path, msg);
-int merge_submodule(unsigned char result[20], const char *path,
- const unsigned char base[20], const unsigned char a[20],
- const unsigned char b[20], int search)
+int merge_submodule(struct object_id *result, const char *path,
+ const struct object_id *base, const struct object_id *a,
+ const struct object_id *b, int search)
{
struct commit *commit_base, *commit_a, *commit_b;
int parent_count;
@@ -1595,14 +1595,14 @@ int merge_submodule(unsigned char result[20], const char *path,
int i;
/* store a in result in case we fail */
- hashcpy(result, a);
+ oidcpy(result, a);
/* we can not handle deletion conflicts */
- if (is_null_sha1(base))
+ if (is_null_oid(base))
return 0;
- if (is_null_sha1(a))
+ if (is_null_oid(a))
return 0;
- if (is_null_sha1(b))
+ if (is_null_oid(b))
return 0;
if (add_submodule_odb(path)) {
@@ -1626,11 +1626,11 @@ int merge_submodule(unsigned char result[20], const char *path,
/* Case #1: a is contained in b or vice versa */
if (in_merge_bases(commit_a, commit_b)) {
- hashcpy(result, b);
+ oidcpy(result, b);
return 1;
}
if (in_merge_bases(commit_b, commit_a)) {
- hashcpy(result, a);
+ oidcpy(result, a);
return 1;
}