Re: [PATCH 2/3] ls-remote: introduce --branches and deprecate --heads
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 3, 2024, 21:42 UTC
- Message-ID
- <CAPig+cQGtgaz3czkg+Faj+CL_-TD0BdbEc1hg6eJuq_yZmvg9w@mail.gmail.com>
- In-Reply-To
- <aa9ff9a4-d504-45c7-8b4e-9744bf0b93aa@gmail.com>
On Mon, Jun 3, 2024 at 5:30 PM Rubén Justo <rjusto@gmail.com> wrote:
Show 7 quoted lines
> On Mon, Jun 03, 2024 at 01:05:38PM -0700, Junio C Hamano wrote:
> > + if (unset) {
> > + warning(_("'--no-heads' is deprecated; use '--no-branches' instead"));
>
> I wonder if this would be better:
>
> warning(_("'%s' is deprecated; use '%s' instead"), '--no-heads', '--no-branches');Unless there is a concrete plan to free up --heads to mean something else in the future, I wonder why we need to warn about this at all, especially since retaining the deprecated --heads alias in perpetuity is effectively zero-cost for the Git maintainers, whereas adding this warning potentially punishes users by making them do extra work for no obvious reason.