From: Jonathan Nieder <jrnieder@gmail.com>
To: Bryan Turner <bturner@atlassian.com>
Cc: Alexander Mills <alexander.d.mills@gmail.com>,
Git Users <git@vger.kernel.org>
Subject: Re: cannot clone --single-commit instead of --single-branch
Date: Thu, 1 Aug 2019 19:43:22 -0700 [thread overview]
Message-ID: <20190802024322.GC54514@google.com> (raw)
In-Reply-To: <CAGyf7-F2qs2=51hdA-1BB=12w7GiwaVZ974eYKFzu-=OKj8Q=g@mail.gmail.com>
Hi,
Bryan Turner wrote:
> 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.
You can do
git clone --no-checkout --filter=blob:none $url repo
cd repo
git checkout $commit
That gives you commits and trees from other commits, but the only blobs
it downloads are from the named commit.
Using the existing tree filtering features to limit the trees fetched
and/or writing a patch for commit filtering are left as exercises to
the reader.
Thanks and hope that helps,
Jonathan
next prev parent reply other threads:[~2019-08-02 2:43 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
2019-08-02 2:43 ` Jonathan Nieder [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190802024322.GC54514@google.com \
--to=jrnieder@gmail.com \
--cc=alexander.d.mills@gmail.com \
--cc=bturner@atlassian.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.
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).