git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ciro Santilli <ciro.santilli@gmail.com>
To: git@vger.kernel.org
Subject: Is it possible to git clone --filter= without any objects?
Date: Tue, 11 Sep 2018 08:29:06 +0100	[thread overview]
Message-ID: <CAFXrp_fLwL5=K3B5rWjY+imoqtskT8LG-UH8ec3CPwM0iiSzFg@mail.gmail.com> (raw)

At v2.19.0 I was trying to clone a fetch just a single directory:
https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository/52269934#52269934

I got really close with:

git clone --depth 1 --no-checkout --filter=blob:none \
  "file://$(pwd)/server_repo" local_repo
cd local_repo
git checkout master -- mydir/

The only missing thing is that uneeded tree objects are still being fetched.

If I had a:

git clone --filter=none

for example then that would be done.

Nothing major since those are small, but just looking for the perfect
command :-)

             reply	other threads:[~2018-09-11  7:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11  7:29 Ciro Santilli [this message]
2018-09-11 17:15 ` Is it possible to git clone --filter= without any objects? Stefan Beller
2018-09-11 17:19   ` Jonathan Tan
2018-09-11 17:46     ` Junio C Hamano
2018-09-11 18:29       ` Ciro Santilli
2018-09-12  1:12         ` Matthew DeVore

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='CAFXrp_fLwL5=K3B5rWjY+imoqtskT8LG-UH8ec3CPwM0iiSzFg@mail.gmail.com' \
    --to=ciro.santilli@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.
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).