git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Patrik Hägglund" <patrik.h.hagglund@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: clone (single) commit id?
Date: Thu, 17 Aug 2023 17:39:02 -0400	[thread overview]
Message-ID: <20230817213902.GA3036503@coredump.intra.peff.net> (raw)
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

      reply	other threads:[~2023-08-17 21:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 19:45 clone (single) commit id? Patrik Hägglund
2023-08-17 19:56 ` Jeff King
2023-08-17 20:20   ` Patrik Hägglund
2023-08-17 21:39     ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230817213902.GA3036503@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=patrik.h.hagglund@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).