Re: [RFC PATCH v3 8/8] --sparse for porcelains

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

 



Johannes Schindelin wrote:

> The thing is: we need a way to determine quickly and without any 
> ambiguity whether a file is tracked, assumed unchanged, or sparse'd-out 
> (which Nguyễn calls no-checkout).

Let's reiterate: "assume-unchanged" is about telling git that it should
assume for performance reasons that state of file in working directory
is the same as state of file in the index.  But, from what was said in
this thread, there are situations where git for correctness reasons
ignores performance hack.

"no-checkout" bit is about telling git that the file is not present
in working directory, and it has to use version from the index.  Then
there is a question if there is file in working area (e.g. from applying
patch) which corresponds to a "no-checkout" file in index (corresponds
because of rename detection).

> And if we change .git/info/sparse, that state _must not_ change.  We did 
> not touch the file by editing .git/info/sparse, so the state must be 
> unchanged.

I think this situation (and the issue of correctness vs "assume-unchanged"
mentioned above) hints that "no-checkout" and "assume-unchanged" should
be separate bits, even if both tell git to use version from index.

There is e.g. question if "git grep" should search "no-checkout" files;
in the "assume-unchanged" case it should, I think, search index version.


P.S. I wonder if it would be worth resurrecting series adding support
for directories in index (which can help performance and 'empty 
directories' issue)...  It would help, I think, with sparse checkout.

-- 
Jakub Narebski
Poland
--
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]