git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: brian m. carlsonNext: Kristoffer Haugsbakk
Message 4 of 5 in “builtin/clone: teach git-clone(1) the --ref= argument”
  1. builtin/clone: teach git-clone(1) the --ref= argumentToon Claes, Sep 27, 2024
  2. Junio C HamanoSep 27, 2024
  3. brian m. carlsonSep 27, 2024
  4. Junio C HamanoSep 27, 2024
  5. Kristoffer HaugsbakkSep 27, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.