From: Junio C Hamano Date: Mon, 16 Mar 2026 15:35:50 GMT Subject: Re: [PATCH 0/2] coccinelle: detect and fix strbuf-by-value parameters Message-ID: In-Reply-To: <20260315094445.19849-1-deveshigurgaon@gmail.com> Deveshi Dwivedi writes: > While reviewing the write_worktree_linking_files() fix [1], Jeff King > suggested adding a coccinelle rule to detect functions that take > struct strbuf by value. I previously posted an RFC discussing such a rule > and its implementation [2]. > > Patch 1/2 adds a coccinelle rule to detect functions that take > struct strbuf by value and rewrites the parameter to a pointer > to highlight the issue. > > Patch 2/2 fixes the one remaining instance found by the rule in > stash.c by changing the parameter to struct strbuf * and > updating the caller accordingly. > > The worktree.c instance that motivated the rule is already fixed > by [1], so only the stash.c case remains. Nicely done. Will queue. Thanks.