summaryrefslogtreecommitdiff
path: root/t/helper/test-sha1-array.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2017-03-31 01:39:56 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-31 08:33:55 -0700
commit98a72ddc12e13231537150607f4a6a8ff8b43854 (patch)
treeb519703af87417aa54f59f80f1a2d6d9ff7f7a8c /t/helper/test-sha1-array.c
parentsha1-array: convert internal storage for struct sha1_array to object_id (diff)
downloadtgif-98a72ddc12e13231537150607f4a6a8ff8b43854.tar.xz
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 't/helper/test-sha1-array.c')
-rw-r--r--t/helper/test-sha1-array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/helper/test-sha1-array.c b/t/helper/test-sha1-array.c
index b4bb97fccc..181c36e0a5 100644
--- a/t/helper/test-sha1-array.c
+++ b/t/helper/test-sha1-array.c
@@ -19,7 +19,7 @@ int cmd_main(int argc, const char **argv)
if (skip_prefix(line.buf, "append ", &arg)) {
if (get_oid_hex(arg, &oid))
die("not a hexadecimal SHA1: %s", arg);
- sha1_array_append(&array, oid.hash);
+ sha1_array_append(&array, &oid);
} else if (skip_prefix(line.buf, "lookup ", &arg)) {
if (get_oid_hex(arg, &oid))
die("not a hexadecimal SHA1: %s", arg);