On Mon, Sep 09, 2024 at 07:19:51PM -0400, Jeff King wrote: > When we expand the %(upstream) or %(push) placeholders, we rely on > remote.c's remote_ref_for_branch() to fill in the ":refname" argument. > But that function has confusing memory ownership semantics: it may or > may not return an allocated string, depending on whether we are in > "upstream" mode or "push" mode. The caller in ref-filter.c always > duplicates the result, meaning that we leak the original in the case of > %(push:refname). Ah, I remember this issue, I think I also have it pending somewhere. Anyway, I'm happy if I can drop one more patch. The change looks sensible to me. Patrick