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

Re: clone (single) commit id?

From
Jeff King <peff@peff.net>
Date
Aug 17, 2023, 21:39 UTC
Message-ID
<20230817213902.GA3036503@coredump.intra.peff.net>
In-Reply-To
<CABtpZSFT2BLJpeDwizZiXB8+tRRLqz+iAFuWaXAiwH_EgS5gag@mail.gmail.com>
On Thu, Aug 17, 2023 at 10:20:20PM +0200, Patrik Hägglund wrote:
> As said, I want to use a commit id for reproducability and
> performance. The CI flow starts several jobs, all using the same
> commit id. A remote branch may be updated, and therefore considered
> not good (reproducible) enough as the reference here.

Oh, sorry, I didn't realize that was the sticking point. No, sadly I don't think there is any way to feed a direct oid to clone currently. Clone does know how to end up on a detached HEAD (e.g., if you specify a tag with "--branch"). IMHO that would be a useful feature to learn, but I think most folks resort to init+fetch, since it's most often useful in scripted situations (like CI) anyway.

-Peff
Previous: Patrik Hägglund
Message 4 of 4 in “clone (single) commit id?”
  1. Patrik HägglundAug 17, 2023
  2. Jeff KingAug 17, 2023
  3. Patrik HägglundAug 17, 2023
  4. Jeff KingAug 17, 2023

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.