Re: Sparse checkouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 8, 2010 at 11:29 PM, Uri Moszkowicz <uri@xxxxxxxxx> wrote:
> Thanks for the reply. "git checkout" does seem to work. The exact commands
> that I used are shown below:
>> Âgit clone -n <dir>
>> Âgit config core.sparsecheckout true
>> Âecho "<dir>/" > .git/info/sparse-checkout
>> Âgit read-tree -m -u HEAD
>
> It would be nice if sparse checkout mode were more intuitive. A start would
> be making it on by default. I don't know why the config bit has to be set.

Because there is overhead in this feature and I guess only a tiny
percent of users needs it. So it's not enabled by default. When I make
the overhead really small, maybe I can convince Junio to enable it by
default.

> Second, when it is enabled, then checkout commands could add the given
> directories to the sparse checkout list. A checkout command with no sparse
> checkout file would result in "*" being added to the file.

Earlier versions of sparse checkout supported that, sparse rules were
much simpler back then. But because you can now set complex rules in
sparse checkout file (keep directory a, but not a/b, but keep a/b/c,
for example), command line support to edit the file automatically may
give unexpected result.

But I think command line support to just clear sparse checkout file
and replace it with "*" is good.

> Third, when
> directories are removed it would be nice if they were removed from the
> sparse checkout file. I don't know if you can trap "rm" or if you need to
> add a new command like "git remove".

That can't be done reliably. If you put pattern "a/*" in sparse
checkout file, then remove a/b, git is not smart enough to put "!a/b"
in sparse checkout file.

> Third, other commands should try to
> bring the tree in sync with the sparse checkout list. read-tree and checkout
> should remove directories which aren't in the list, perhaps throwing an
> error if there were changes in those directories.

Let me think about this. Not all commands should try to sync, but
perhaps some of them should.

Thank you for your feedback.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]