Imported Upstream version 2.10.2
[platform/upstream/git.git] / contrib / coccinelle / object_id.cocci
1 @@
2 expression E1;
3 @@
4 - is_null_sha1(E1.hash)
5 + is_null_oid(&E1)
6
7 @@
8 expression E1;
9 @@
10 - is_null_sha1(E1->hash)
11 + is_null_oid(E1)
12
13 @@
14 expression E1;
15 @@
16 - sha1_to_hex(E1.hash)
17 + oid_to_hex(&E1)
18
19 @@
20 expression E1;
21 @@
22 - sha1_to_hex(E1->hash)
23 + oid_to_hex(E1)
24
25 @@
26 expression E1, E2;
27 @@
28 - sha1_to_hex_r(E1, E2.hash)
29 + oid_to_hex_r(E1, &E2)
30
31 @@
32 expression E1, E2;
33 @@
34 - sha1_to_hex_r(E1, E2->hash)
35 + oid_to_hex_r(E1, E2)
36
37 @@
38 expression E1;
39 @@
40 - hashclr(E1.hash)
41 + oidclr(&E1)
42
43 @@
44 expression E1;
45 @@
46 - hashclr(E1->hash)
47 + oidclr(E1)
48
49 @@
50 expression E1, E2;
51 @@
52 - hashcmp(E1.hash, E2.hash)
53 + oidcmp(&E1, &E2)
54
55 @@
56 expression E1, E2;
57 @@
58 - hashcmp(E1->hash, E2->hash)
59 + oidcmp(E1, E2)
60
61 @@
62 expression E1, E2;
63 @@
64 - hashcmp(E1->hash, E2.hash)
65 + oidcmp(E1, &E2)
66
67 @@
68 expression E1, E2;
69 @@
70 - hashcmp(E1.hash, E2->hash)
71 + oidcmp(&E1, E2)
72
73 @@
74 expression E1, E2;
75 @@
76 - hashcpy(E1.hash, E2.hash)
77 + oidcpy(&E1, &E2)
78
79 @@
80 expression E1, E2;
81 @@
82 - hashcpy(E1->hash, E2->hash)
83 + oidcpy(E1, E2)
84
85 @@
86 expression E1, E2;
87 @@
88 - hashcpy(E1->hash, E2.hash)
89 + oidcpy(E1, &E2)
90
91 @@
92 expression E1, E2;
93 @@
94 - hashcpy(E1.hash, E2->hash)
95 + oidcpy(&E1, E2)