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>
This commit is contained in:

committed by
Junio C Hamano

parent
ee3051bd23
commit
98a72ddc12
@ -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);
|
||||
|
Reference in New Issue
Block a user