diff options
author | Brandon Williams <bmwill@google.com> | 2017-04-28 16:53:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-01 12:17:10 +0900 |
commit | 419fd7866c7636e4f2e3606888273b38d8cdacd4 (patch) | |
tree | 8fa2fd51acd291527ea8a7ac35a7b4adc790593e /submodule.c | |
parent | 027a3b943b444a3e3a76f9a89803fc10245b858f (diff) | |
download | git-419fd7866c7636e4f2e3606888273b38d8cdacd4.tar.gz |
submodule: rename add_sha1_to_array()
Rename 'add_sha1_to_array()' to 'append_oid_to_array()' to more
accurately describe what the function does, since it handles
'struct object_id' and not sha1 character arrays.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/submodule.c b/submodule.c index d3299e29c0..be0f5d8478 100644 --- a/submodule.c +++ b/submodule.c @@ -951,17 +951,18 @@ 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) +static int append_oid_to_array(const char *ref, const struct object_id *oid, + int flags, void *data) { - oid_array_append(data, oid); + struct oid_array *array = data; + oid_array_append(array, oid); return 0; } void check_for_new_submodule_commits(struct object_id *oid) { if (!initialized_fetch_ref_tips) { - for_each_ref(add_sha1_to_array, &ref_tips_before_fetch); + for_each_ref(append_oid_to_array, &ref_tips_before_fetch); initialized_fetch_ref_tips = 1; } |