aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-27 11:00:03 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-27 11:00:03 -0700
commit7241be412367d60c69b1eb7eb979be5935bed646 (patch)
tree30ceeab91b7842697456de1cb66366d0f854823c /tools
parent18396dc97d3e6b2f36772103b88c8855b703ea6b (diff)
parentf64c50e76827f39c843102bc603817648a38a48c (diff)
downloadgit-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.cocci7
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