Re: [PATCH] builtin/clone: teach git-clone(1) the --ref= argument
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 27, 2024, 20:05 UTC
- Message-ID
- <xmqq8qvcg8vr.fsf@gitster.g>
- In-Reply-To
- <ZvcHpd26te8TPacz@tapette.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> 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.