From: Derrick Stolee Date: Tue, 06 Apr 2021 11:15:30 GMT Subject: Re: [PATCH 5/5] maintenance: allow custom refspecs during prefetch Message-ID: <41a4b531-d315-9743-34cc-d9f86c335f7d@gmail.com> In-Reply-To: <20210405171652.xp63czmtsswqor2m@brm-x62-17.us.oracle.com> On 4/5/2021 1:16 PM, Tom Saeger wrote: > On Mon, Apr 05, 2021 at 01:04:15PM +0000, Derrick Stolee via GitGitGadget wrote: >> From: Derrick Stolee >> + strvec_push(&child.args, refspec_item_format(&replace)); > > see comment on 3/5, think refspec_item_format is leaking here. > this code looks fine though. I will respond to the comments on patch 3, but this is the reason a static strbuf is used: we can print like this without needing to store the buffer in a variable and free() it here. Seemed like an easier-to-use API for a non-critical area of code. I'll continue the discussion over on that patch thread. Thanks, -Stolee