Re: Watchman support for git

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

 



On Wed, May 14, 2014 at 5:38 AM, David Turner <dturner@xxxxxxxxxxxxxxxx> wrote:
> On Mon, 2014-05-12 at 17:45 +0700, Duy Nguyen wrote:
>> This is your quote from above, moved down a bit:
>>
>> > update_fs_cache should only have to update based on what it has learned
>> > from watchman.  So if no .gitignore has been changed, it should not have
>> > to do very much work.
>> >
>> > I could take the fe_excluded check and move it above the
>> > last_exclude_matching check in fs_cache_is_excluded; it causes t7300 to
>> > fail when run under watchman but presumably that's fixable
>>
>> So you exclude files early and make the real read_directory() pass do
>> pretty much nothing. This is probably not a good idea. Assume that I
>> touch $TOP/.gitignore then do something other than "git status" (or
>> "git add") then I have to pay read_directory() cost.
>
> I'm not sure I understand this. read_directory does something: it checks
> the fs_cache (instead of the filesystem) for untracked files.

A lot of commands do read_cache() that that eventually calls
update_fs_cache, which does part of read_directory's work (the
fe_excluded thing). But not many of those commands actually call
read_directory(). It'd better if there's a way to mark that "this
.gitignore is changed", but delay the actual exclude processsing until
we are sure read_directory() will be used.
-- 
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]