Re: [PATCH 4/8] fetch: pass the full local reference name to `format_display`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 15, 2023, 22:18 UTC
- Message-ID
- <xmqqa60dodze.fsf@gitster.g>
- In-Reply-To
- <0998173b57e8d7aea7a77673fa8e54dc54538a9b.1678878623.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> Before printing the name of the local references that would be updated > by a fetch we first prettify the reference name. This is done at the > calling side so that `format_display()` never sees the full name of the > local reference. This restricts our ability to introduce new output > formats that might want to print the full reference name.
As long as the prettify at the caller is *not* done to avoid doing the same prettifying multiple times, this change makes perfect sense.
> So let's refactor the > code to pass in the full local reference name and then prettify it in > the formatting code.
Good thinking.