completion: add --skip for cherry-pick and revert
[git/git.git] / contrib / coccinelle / strbuf.cocci
1 @ strbuf_addf_with_format_only @
2 expression E;
3 constant fmt !~ "%";
4 @@
5 - strbuf_addf
6 + strbuf_addstr
7 (E,
8 (
9 fmt
10 |
11 _(fmt)
12 )
13 );
14
15 @@
16 expression E;
17 struct strbuf SB;
18 format F =~ "s";
19 @@
20 - strbuf_addf(E, "%@F@", SB.buf);
21 + strbuf_addbuf(E, &SB);
22
23 @@
24 expression E;
25 struct strbuf *SBP;
26 format F =~ "s";
27 @@
28 - strbuf_addf(E, "%@F@", SBP->buf);
29 + strbuf_addbuf(E, SBP);
30
31 @@
32 expression E;
33 struct strbuf SB;
34 @@
35 - strbuf_addstr(E, SB.buf);
36 + strbuf_addbuf(E, &SB);
37
38 @@
39 expression E;
40 struct strbuf *SBP;
41 @@
42 - strbuf_addstr(E, SBP->buf);
43 + strbuf_addbuf(E, SBP);
44
45 @@
46 expression E1, E2;
47 format F =~ "s";
48 @@
49 - strbuf_addf(E1, "%@F@", E2);
50 + strbuf_addstr(E1, E2);
51
52 @@
53 expression E1, E2, E3;
54 @@
55 - strbuf_addstr(E1, find_unique_abbrev(E2, E3));
56 + strbuf_add_unique_abbrev(E1, E2, E3);
57
58 @@
59 expression E1, E2;
60 @@
61 - strbuf_addstr(E1, real_path(E2));
62 + strbuf_add_real_path(E1, E2);