diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-03-27 11:00:03 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-27 11:00:03 -0700 |
| commit | 7241be412367d60c69b1eb7eb979be5935bed646 (patch) | |
| tree | 30ceeab91b7842697456de1cb66366d0f854823c /tools | |
| parent | 18396dc97d3e6b2f36772103b88c8855b703ea6b (diff) | |
| parent | f64c50e76827f39c843102bc603817648a38a48c (diff) | |
| download | git-7241be412367d60c69b1eb7eb979be5935bed646.tar.xz | |
Merge branch 'jc/rerere-modern-strbuf-handling'
Code clean-up overdue by 19 years.
* jc/rerere-modern-strbuf-handling:
cocci: strbuf.buf is never NULL
rerere: update to modern representation of empty strbufs
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/coccinelle/strbuf.cocci | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/coccinelle/strbuf.cocci b/tools/coccinelle/strbuf.cocci index 83bd93be5f..f586128329 100644 --- a/tools/coccinelle/strbuf.cocci +++ b/tools/coccinelle/strbuf.cocci @@ -71,3 +71,10 @@ identifier fn, param; { ... } + +// In modern codebase, .buf member of an empty strbuf is not NULL. +@@ +struct strbuf SB; +@@ +- SB.buf ? SB.buf : "" ++ SB.buf |
