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>
Brandon Williams committed
Apr 28, 2017 at 16:53 UTC
419fd7866c7636e4f2e3606888273b38d8cdacd4
1 file changed
+5
-4
submodule.c
+5
-4
@@ -951,17 +951,18 @@ static void submodule_collect_changed_cb(struct diff_queue_struct *q,
951
}
952
}
953
954
-static int add_sha1_to_array(const char *ref, const struct object_id *oid,
955
- int flags, void *data)
954
+static int append_oid_to_array(const char *ref, const struct object_id *oid,
955
+ int flags, void *data)
956
{
957
- oid_array_append(data, oid);
957
+ struct oid_array *array = data;
958
+ oid_array_append(array, oid);
959
return 0;
960
}
961
962
void check_for_new_submodule_commits(struct object_id *oid)
963
{
964
if (!initialized_fetch_ref_tips) {
964
- for_each_ref(add_sha1_to_array, &ref_tips_before_fetch);
965
+ for_each_ref(append_oid_to_array, &ref_tips_before_fetch);
966
initialized_fetch_ref_tips = 1;
967
}
968