Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-27 02:09:14 +0300
committerJunio C Hamano <gitster@pobox.com>2016-09-27 02:09:14 +0300
commit85f34a929dc0f8c82f7167fe100d5264d7374876 (patch)
treeb91491510bf7d8165bcfeb1f3a54bf4d36a05318 /contrib
parent6fe1b1407ed91823daa5d487abe457ff37463349 (diff)
parenta22ae753cb297cb8a1e3ae950ae4415190cd51d5 (diff)
Merge branch 'rs/cocci'
Code cleanup. * rs/cocci: use strbuf_addstr() for adding constant strings to a strbuf, part 2 add coccicheck make target contrib/coccinelle: fix semantic patch for oid_to_hex_r()
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/object_id.cocci12
-rw-r--r--contrib/coccinelle/strbuf.cocci5
2 files changed, 11 insertions, 6 deletions
diff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci
index 8ccdbb5666..0307624a03 100644
--- a/contrib/coccinelle/object_id.cocci
+++ b/contrib/coccinelle/object_id.cocci
@@ -23,16 +23,16 @@ expression E1;
+ oid_to_hex(E1)
@@
-expression E1;
+expression E1, E2;
@@
-- sha1_to_hex_r(E1.hash)
-+ oid_to_hex_r(&E1)
+- sha1_to_hex_r(E1, E2.hash)
++ oid_to_hex_r(E1, &E2)
@@
-expression E1;
+expression E1, E2;
@@
-- sha1_to_hex_r(E1->hash)
-+ oid_to_hex_r(E1)
+- sha1_to_hex_r(E1, E2->hash)
++ oid_to_hex_r(E1, E2)
@@
expression E1;
diff --git a/contrib/coccinelle/strbuf.cocci b/contrib/coccinelle/strbuf.cocci
new file mode 100644
index 0000000000..7932d48cdf
--- /dev/null
+++ b/contrib/coccinelle/strbuf.cocci
@@ -0,0 +1,5 @@
+@@
+expression E1, E2;
+@@
+- strbuf_addf(E1, E2);
++ strbuf_addstr(E1, E2);