On Fri, Mar 17, 2023 at 01:24:49PM -0700, Jonathan Tan wrote: > Patrick Steinhardt writes: [snip] > > fetch: deduplicate logic to print remote URL > > Makes sense, although I would need to consider only storing the > raw URL in the struct display_state and processing it when it needs > to be emitted (haven't checked if this is feasible, though). We likely could, but right now the benefit isn't all that high. If the URL was only used in `display_ref_update()` then this would be easy enough to do. But we also access the sanitized URL when the connectivity check fails or when printing to FETCH_HEAD. If we provided an accessor function thet returns the URL it would be trivial to do, but what do we really gain here? In the best case we save an allocation for the URL and two loops ranging over it. That doesn't quite feel worth it to me. Patrick