From: Bryan Turner <bturner@atlassian.com>
To: Alexander Mills <alexander.d.mills@gmail.com>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: cannot clone --single-commit instead of --single-branch
Date: Thu, 1 Aug 2019 15:40:40 -0700 [thread overview]
Message-ID: <CAGyf7-F2qs2=51hdA-1BB=12w7GiwaVZ974eYKFzu-=OKj8Q=g@mail.gmail.com> (raw)
In-Reply-To: <CA+KyZp6mYx4C22syAu=W2Okf7tDwtQ+7vVUBaQ-2D70PTS+GaA@mail.gmail.com>
On Thu, Aug 1, 2019 at 1:52 PM Alexander Mills
<alexander.d.mills@gmail.com> wrote:
>
> Looking for help with this problem:
>
> https://stackoverflow.com/questions/57316783/git-clone-single-branch-does-not-work-for-sha-commit-ids
>
> Essentially looking for:
>
> git clone --single-commit
There's no such option, which will be why it doesn't work. I suspect
the closest feature is a shallow clone, performed using git clone
--depth=1. That's still not going to allow passing an arbitrary SHA-1,
though; it'll only support a branch name, the same as --single-branch,
which --depth implies (unless --no-single-branch is specified, at
which point it fetches the depth for all branches).
Promisor remotes and other in-flight changes might help provide some
of what you're looking for, but I'm not aware of any already-available
solution. Perhaps something like VFS for Git, if whatever hosting
solution you're using supports it.
Hope this helps!
Bryan
next prev parent reply other threads:[~2019-08-01 22:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 20:52 cannot clone --single-commit instead of --single-branch Alexander Mills
2019-08-01 22:40 ` Bryan Turner [this message]
2019-08-02 2:43 ` Jonathan Nieder
2019-08-02 3:07 ` Mike Hommey
2019-08-02 2:57 ` Jonathan Nieder
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGyf7-F2qs2=51hdA-1BB=12w7GiwaVZ974eYKFzu-=OKj8Q=g@mail.gmail.com' \
--to=bturner@atlassian.com \
--cc=alexander.d.mills@gmail.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).