diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-04-04 10:56:21 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-04-04 10:56:21 -0700 |
| commit | 1041d58b4d9c587b2b6c76c3dfb14fbe78ccf196 (patch) | |
| tree | f6203832102655e0e5de47976186bb4a250b75dd /contrib | |
| parent | 3ff8cbfe8a333f55931fa9b588f106e060a67079 (diff) | |
| parent | 9c4d58ff2c385f49585197c8650356955e1fa02e (diff) | |
| download | git-1041d58b4d9c587b2b6c76c3dfb14fbe78ccf196.tar.gz | |
Merge branch 'tl/ls-tree-oid-only'
"git ls-tree" learns "--oid-only" option, similar to "--name-only",
and more generalized "--format" option.
* tl/ls-tree-oid-only:
ls-tree: split up "fast path" callbacks
ls-tree: detect and error on --name-only --name-status
ls-tree: support --object-only option for "git-ls-tree"
ls-tree: introduce "--format" option
cocci: allow padding with `strbuf_addf()`
ls-tree: introduce struct "show_tree_data"
ls-tree: slightly refactor `show_tree()`
ls-tree: fix "--name-only" and "--long" combined use bug
ls-tree: simplify nesting if/else logic in "show_tree()"
ls-tree: rename "retval" to "recurse" in "show_tree()"
ls-tree: use "size_t", not "int" for "struct strbuf"'s "len"
ls-tree: use "enum object_type", not {blob,tree,commit}_type
ls-tree: add missing braces to "else" arms
ls-tree: remove commented-out code
ls-tree tests: add tests for --name-status
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/coccinelle/strbuf.cocci | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/coccinelle/strbuf.cocci b/contrib/coccinelle/strbuf.cocci index d9ada69b43..0970d98ad7 100644 --- a/contrib/coccinelle/strbuf.cocci +++ b/contrib/coccinelle/strbuf.cocci @@ -15,7 +15,7 @@ constant fmt !~ "%"; @@ expression E; struct strbuf SB; -format F =~ "s"; +format F =~ "^s$"; @@ - strbuf_addf(E, "%@F@", SB.buf); + strbuf_addbuf(E, &SB); @@ -23,7 +23,7 @@ format F =~ "s"; @@ expression E; struct strbuf *SBP; -format F =~ "s"; +format F =~ "^s$"; @@ - strbuf_addf(E, "%@F@", SBP->buf); + strbuf_addbuf(E, SBP); @@ -44,7 +44,7 @@ struct strbuf *SBP; @@ expression E1, E2; -format F =~ "s"; +format F =~ "^s$"; @@ - strbuf_addf(E1, "%@F@", E2); + strbuf_addstr(E1, E2); |
