Re: [PATCH v2 3/3] show-ref: introduce --branches and deprecate --heads
- From
Elijah Newren <newren@gmail.com>
- Date
- Jun 14, 2024, 21:42 UTC
- Message-ID
- <CABPp-BEZhR8T56bwxpi+_uGG8w7nms+7HtCR45S4oVjPom9Stg@mail.gmail.com>
- In-Reply-To
- <CABPp-BEM4fqU9s7_dxgi_twe_T169mGjZN9-CJRLU5cjnUi8WQ@mail.gmail.com>
On Fri, Jun 14, 2024 at 9:34 PM Elijah Newren <newren@gmail.com> wrote:
Show 27 quoted lines
>
> On Fri, Jun 14, 2024 at 9:21 PM Junio C Hamano <gitster@pobox.com> wrote:
> >
> > Elijah Newren <newren@gmail.com> writes:
> >
> > > If we are renaming --heads to --branches, should --head also be renamed?
> >
> > I do not think so. It is specifically about HEAD (the thing that
> > lives above refs/ hierarchy, historically implemented as a file
> > whose name is "HEAD" that is directly inside $GIT_DIR).
> >
> > Thanks.
>
> I'm fine if we don't want to rename it, but I don't quite follow this
> particular rationale. The logic you use here seems to be about
> internal details ("it's the file named HEAD") and ignores what users
> might refer to it as ("current branch"), whereas --branches ignored
> the internal details ("the files under refs/heads/") and instead
> concentrates on what users might refer to them as ("branches") and
> used that as the rationale for renaming.
>
> That said, I've almost never seen users use --head (and haven't used
> it myself), whereas asking for heads/branches is much more common, and
> I'm very happy with the change from --heads to --branches. Also, even
> if we do agree --head should be renamed, I'd be fine with punting it
> to later in order to get this improvement in now...it just seemed like
> a small inconsistency that I thought was worth pointing out....or maybe my argument breaks down because `HEAD` is more prominent and tends to be used by users more (`git reset --hard HEAD`, `git checkout HEAD~1`), and thus there's an argument it already is somewhat aligned with user terminology?