mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Merge branch 'rs/cocci'
Improve the rule to convert "unsigned char [20]" into "struct object_id *" in contrib/coccinelle/ * rs/cocci: cocci: avoid self-references in object_id transformations
This commit is contained in:
commit
bcb4425216
|
@ -17,10 +17,13 @@ expression E1;
|
||||||
+ oid_to_hex(&E1)
|
+ oid_to_hex(&E1)
|
||||||
|
|
||||||
@@
|
@@
|
||||||
|
identifier f != oid_to_hex;
|
||||||
expression E1;
|
expression E1;
|
||||||
@@
|
@@
|
||||||
|
f(...) {...
|
||||||
- sha1_to_hex(E1->hash)
|
- sha1_to_hex(E1->hash)
|
||||||
+ oid_to_hex(E1)
|
+ oid_to_hex(E1)
|
||||||
|
...}
|
||||||
|
|
||||||
@@
|
@@
|
||||||
expression E1, E2;
|
expression E1, E2;
|
||||||
|
@ -29,10 +32,13 @@ expression E1, E2;
|
||||||
+ oid_to_hex_r(E1, &E2)
|
+ oid_to_hex_r(E1, &E2)
|
||||||
|
|
||||||
@@
|
@@
|
||||||
|
identifier f != oid_to_hex_r;
|
||||||
expression E1, E2;
|
expression E1, E2;
|
||||||
@@
|
@@
|
||||||
|
f(...) {...
|
||||||
- sha1_to_hex_r(E1, E2->hash)
|
- sha1_to_hex_r(E1, E2->hash)
|
||||||
+ oid_to_hex_r(E1, E2)
|
+ oid_to_hex_r(E1, E2)
|
||||||
|
...}
|
||||||
|
|
||||||
@@
|
@@
|
||||||
expression E1;
|
expression E1;
|
||||||
|
@ -41,10 +47,13 @@ expression E1;
|
||||||
+ oidclr(&E1)
|
+ oidclr(&E1)
|
||||||
|
|
||||||
@@
|
@@
|
||||||
|
identifier f != oidclr;
|
||||||
expression E1;
|
expression E1;
|
||||||
@@
|
@@
|
||||||
|
f(...) {...
|
||||||
- hashclr(E1->hash)
|
- hashclr(E1->hash)
|
||||||
+ oidclr(E1)
|
+ oidclr(E1)
|
||||||
|
...}
|
||||||
|
|
||||||
@@
|
@@
|
||||||
expression E1, E2;
|
expression E1, E2;
|
||||||
|
@ -53,10 +62,13 @@ expression E1, E2;
|
||||||
+ oidcmp(&E1, &E2)
|
+ oidcmp(&E1, &E2)
|
||||||
|
|
||||||
@@
|
@@
|
||||||
|
identifier f != oidcmp;
|
||||||
expression E1, E2;
|
expression E1, E2;
|
||||||
@@
|
@@
|
||||||
|
f(...) {...
|
||||||
- hashcmp(E1->hash, E2->hash)
|
- hashcmp(E1->hash, E2->hash)
|
||||||
+ oidcmp(E1, E2)
|
+ oidcmp(E1, E2)
|
||||||
|
...}
|
||||||
|
|
||||||
@@
|
@@
|
||||||
expression E1, E2;
|
expression E1, E2;
|
||||||
|
@ -77,10 +89,13 @@ expression E1, E2;
|
||||||
+ oidcpy(&E1, &E2)
|
+ oidcpy(&E1, &E2)
|
||||||
|
|
||||||
@@
|
@@
|
||||||
|
identifier f != oidcpy;
|
||||||
expression E1, E2;
|
expression E1, E2;
|
||||||
@@
|
@@
|
||||||
|
f(...) {...
|
||||||
- hashcpy(E1->hash, E2->hash)
|
- hashcpy(E1->hash, E2->hash)
|
||||||
+ oidcpy(E1, E2)
|
+ oidcpy(E1, E2)
|
||||||
|
...}
|
||||||
|
|
||||||
@@
|
@@
|
||||||
expression E1, E2;
|
expression E1, E2;
|
||||||
|
|
Loading…
Reference in a new issue