git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Uri Moszkowicz <uri@4refs.com>
Cc: git@vger.kernel.org
Subject: Re: Sparse checkouts
Date: Sun, 7 Nov 2010 13:39:11 +0700	[thread overview]
Message-ID: <AANLkTi=7jeeEw58SQOWmWUx54epWinTuTJE_h=bxcYvO@mail.gmail.com> (raw)
In-Reply-To: <loom.20101107T030122-536@post.gmane.org>

On Sun, Nov 7, 2010 at 9:04 AM, Uri Moszkowicz <uri@4refs.com> wrote:
> Hi,
> I'm working with a repository with a very large number of files and Git is
> appealing because it officially supports sparse checkouts unlike the other
> DVCS tools. However, all of the usage examples that I've come across have
> you checkout the full repository and then prune the undesired files as such:
>
>  git clone <dir>
>  git config core.sparsecheckout true
>  echo "<dir>/" > .git/info/sparse-checkout
>  git read-tree -m -u HEAD

You can replace the last command with "git checkout" (no additional argument)

> I tried adding "-n" to the clone command but then none of the missing
> directories are checked out by read-tree.

Hmm.. it works fine here. Can you post the exact sequence of commands you used?

> I can manually check them out
> and everything seems to work fine but I can also manually check out a bunch
> of other directories and read-tree, reset, etc all seem to ignore the extra
> directory even though they aren't specified in the sparse-checkout file

Sparse checkout mode does not stop you from checking out non-sparse
files. But all those files are not "seen" by git because of sparse
checkout mode. They are ignored most of the time, except when git is
going to overwrite them.

> Is this use mode just not well supported by git yet or am I missing something?

Sparse checkout support is pretty basic. Any suggestions are welcome.
-- 
Duy

  reply	other threads:[~2010-11-07  6:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-07  2:04 Sparse checkouts Uri Moszkowicz
2010-11-07  6:39 ` Nguyen Thai Ngoc Duy [this message]
     [not found]   ` <AANLkTikahpqj-R7bjEJnPG0FU8Bg26R7Jtf4Lt6JSE+t@mail.gmail.com>
2010-11-11 11:56     ` Nguyen Thai Ngoc Duy

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='AANLkTi=7jeeEw58SQOWmWUx54epWinTuTJE_h=bxcYvO@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=uri@4refs.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).