Subject: Re: [PATCH] builtin/clone: teach git-clone(1) the --ref= argument

From: Junio C Hamano <[email-masked]>
Date: Fri, 27 Sep 2024 13:05:28 -0700

"brian m. carlson" <[email-masked]> writes:

> I can't speak for what Toon intended here, but GitHub uses some
> references under `refs/pull` that are used for tracking pull requests.

Ah, that is an excellent example that can be used to strengthen the
motivation part of this commit.

    A user may want to clone only "refs/pull/$n/head" to take a
    peek, but unlike refs/heads/ and refs/tags/, for which the
    "--branch" option can be used, there is no good simple way to do
    so with "git clone".

would make a good intro paragraph for a proposed log message.

> So I think this is a generally useful feature, although I agree
> that perhaps the commit message might explain the benefits in a
> more concrete way for those who don't already understand the
> utility of the feature (such as our illustrious maintainer).

Yes, not seeing refs/pull/ without being told was slight lack of
imagination on my part, but it is a good idea to spell out the
motivation in concrete terms when we can.

Thanks.