coccinelle: convert hashcpy() with null_sha1 to hashclr()
authorbrian m. carlson <sandals@crustytoothpaste.net>
Fri, 24 Jun 2016 23:09:21 +0000 (23:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jun 2016 18:39:02 +0000 (11:39 -0700)
commitf449198e58630b8b57c94e3eeab4927afd7ee03a
tree50877158a6d9c79514fac50e2cb31af0a9b5c780
parentdb1d80b8faddc5d5702d79974c5757b464bcbaf6
coccinelle: convert hashcpy() with null_sha1 to hashclr()

hashcpy with null_sha1 as the source is equivalent to hashclr.  In
addition to being simpler, using hashclr may give the compiler a chance
to optimize better.  Convert instances of hashcpy with the source
argument of null_sha1 to hashclr.

This transformation was implemented using the following semantic patch:

@@
expression E1;
@@
-hashcpy(E1, null_sha1);
+hashclr(E1);

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c
builtin/unpack-objects.c
diff.c
submodule-config.c
t/helper/test-submodule-config.c