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