summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-03-31 01:39:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-31 15:33:55 (GMT)
commit98a72ddc12e13231537150607f4a6a8ff8b43854 (patch)
treeb519703af87417aa54f59f80f1a2d6d9ff7f7a8c /submodule.c
parentee3051bd2307cdc0145aa9ed9dcacb8acfc08c40 (diff)
downloadgit-98a72ddc12e13231537150607f4a6a8ff8b43854.zip
git-98a72ddc12e13231537150607f4a6a8ff8b43854.tar.gz
git-98a72ddc12e13231537150607f4a6a8ff8b43854.tar.bz2
Make sha1_array_append take a struct object_id *
Convert the callers to pass struct object_id by changing the function declaration and definition and applying the following semantic patch: @@ expression E1, E2; @@ - sha1_array_append(E1, E2.hash) + sha1_array_append(E1, &E2) @@ expression E1, E2; @@ - sha1_array_append(E1, E2->hash) + sha1_array_append(E1, E2) Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule.c b/submodule.c
index 5c5c18e..7912cba 100644
--- a/submodule.c
+++ b/submodule.c
@@ -650,7 +650,7 @@ static void collect_submodules_from_diff(struct diff_queue_struct *q,
if (!S_ISGITLINK(p->two->mode))
continue;
commits = submodule_commits(submodules, p->two->path);
- sha1_array_append(commits, p->two->oid.hash);
+ sha1_array_append(commits, &p->two->oid);
}
}
@@ -817,7 +817,7 @@ static void submodule_collect_changed_cb(struct diff_queue_struct *q,
static int add_sha1_to_array(const char *ref, const struct object_id *oid,
int flags, void *data)
{
- sha1_array_append(data, oid->hash);
+ sha1_array_append(data, oid);
return 0;
}
@@ -828,7 +828,7 @@ void check_for_new_submodule_commits(struct object_id *oid)
initialized_fetch_ref_tips = 1;
}
- sha1_array_append(&ref_tips_after_fetch, oid->hash);
+ sha1_array_append(&ref_tips_after_fetch, oid);
}
static int add_sha1_to_argv(const unsigned char sha1[20], void *data)