Re: sparse support in pu
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 17, 2009, 09:15 UTC
- Message-ID
- <alpine.DEB.1.00.0908171113420.4991@intel-tinevez-2-302>
- In-Reply-To
- <2729632a0908170149o425544dcw52aeb6ac6ee1437d@mail.gmail.com>
Hi,
On Mon, 17 Aug 2009, skillzero@gmail.com wrote:
Show 18 quoted lines
> On Mon, Aug 17, 2009 at 1:17 AM, Nguyen Thai Ngoc Duy<pclouds@gmail.com> wrote: > > On Mon, Aug 17, 2009 at 1:09 PM, <skillzero@gmail.com> wrote: > >> 1. Have people decided whether it should be on by default if you have > >> a .git/info/sparse file? I'd definitely like it to be on by > >> default. When I first tried it, I didn't realize I had to use > >> --sparse to git checkout to get it to use the sparse rules. The > >> same goes for a merge I did that happened to have a file in the > >> excluded area (it included it because I didn't use --sparse to git > >> merge). > > > > I tend to make it enabled by default too. I have made it stricter to > > trigger reading sparse in unpack_trees() -- only do it when > > unpack_opts.update is TRUE. This should make it safer to be enabled by > > default. > > Other than it being new and not-widely-tested code, is there any > additional risk to having it enabled by default if there are no sparse > patterns defined?
I think that in and of itself is reason enough to turn off the feature when .git/info/sparse is not present.
It also may have a runtime cost, dunno.
> It would be nice if .git/info/sparse is there by default (like > .git/info/exclude) with some commented out instructions (also like > .git/info/exclude).
I'm not a fan of this idea.
Show 12 quoted lines
> >> 3. One thing that was confusing is that I needed a trailing slash on > >> directories in .git/info/sparse to get them excluded. This seems > >> different than .gitignore, which works for me without the trailing > >> slash. > > > > Hmm.. probably because Git feeds directories to .gitignore handling > > functions. There is not much I can do, index does not have > > directories. I don't know if it's worth generating "directories" from > > index. > > Maybe just add a note in the documentation? If there's a default > .git/info/sparse file then it might be good place to put a note as well.
I rather think that this should be fixed. Maybe you can come up with a patch to the tests which shows this behavior (with test_expect_failure)? Then it will be much easier to come up with a fix.
Ciao, Dscho