From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Couder Subject: Re: [PATCH 7/8] config: add core.untrackedCache Date: Tue, 15 Dec 2015 17:42:40 +0100 Message-ID: References: <1449594916-21167-1-git-send-email-chriscool@tuxfamily.org> <1449594916-21167-8-git-send-email-chriscool@tuxfamily.org> <566FE228.8040708@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Junio C Hamano , git , Jeff King , =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= , Nguyen Thai Ngoc Duy , David Turner , Eric Sunshine , Christian Couder To: =?UTF-8?Q?Torsten_B=C3=B6gershausen?= X-From: git-owner@vger.kernel.org Tue Dec 15 17:42:51 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a8sgb-0000sJ-3c for gcvg-git-2@plane.gmane.org; Tue, 15 Dec 2015 17:42:49 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965211AbbLOQmo convert rfc822-to-quoted-printable (ORCPT ); Tue, 15 Dec 2015 11:42:44 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:36554 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751516AbbLOQmm convert rfc822-to-8bit (ORCPT ); Tue, 15 Dec 2015 11:42:42 -0500 Received: by mail-lf0-f47.google.com with SMTP id z124so6137941lfa.3 for ; Tue, 15 Dec 2015 08:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=gX0AJ+X+CkIZRIl7VvzsD8W8Ym54bSr787bM3Dgajjk=; b=TEfT0MD20IPme5c6WYT5u6yxI/OsEdlRWZQ5Z3nNlycp26pPAPbLIsWoe8DTyfYOuh NJbIFdwZMqZ1IEwFg/uCigfJj8Xvz7KoLQ4lH0VbybXtcr4ZuSZCFARJFJX2tbYTe1WL 2+8f0Sjr66qPvWo9SN/KCW8PcNVihZNtV+EegnvTC9jwCurkmd8nRsAXZqS63HvnvLeI Zdc5oaWQwmzL5sOcXqdXvspgRj2UH5rPhV2hVsXwY7JFDO5N/1Dx9WBy/s+KDw/8hYNU rRwAdH0XSarnGv6JuWT70EGi2ROjRC95PPVqafF8gc2PTF9a1whO/oROrhWtQ/cdN8tx zh+Q== X-Received: by 10.25.163.85 with SMTP id m82mr16097854lfe.76.1450197761080; Tue, 15 Dec 2015 08:42:41 -0800 (PST) Received: by 10.25.152.7 with HTTP; Tue, 15 Dec 2015 08:42:40 -0800 (PST) In-Reply-To: <566FE228.8040708@web.de> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Tue, Dec 15, 2015 at 10:49 AM, Torsten B=C3=B6gershausen wrote: > On 15.12.15 10:34, Christian Couder wrote: >> On Mon, Dec 14, 2015 at 10:30 PM, Junio C Hamano = wrote: >>> Junio C Hamano writes: >>> >>> The primary reason why I do not like your "configuration decides" i= s >>> it will be a huge source of confusions and bugs. Imagine what >>> should happen in this sequence, and when should a stale cached >>> information be discarded? >>> >>> - the configuration is set to 'yes'. >>> - the index is updated and written by various commands. >>> - more work is done in the working tree without updating the index= =2E >>> - the configuration is set to 'no'. >>> - more work is done in the working tree without updating the index= =2E >>> - the configuration is set to 'yes'. >>> - more work is done in the working tree without updating the index= =2E >>> - somebody asks "what untracked paths are there?" >> > >> As far as I understand the UC just stores the mtime of the directori= es >> in the working tree to avoid the need of lstat'ing all the files in >> the directories. > > This is what I understand: > UC stores the mtime of the directories in the working tree to avoid t= he need > opendir() readdir() closedir() to find new, yet untracked, files. > (including sub-directories) I think you are probably right too. In the v2 patch series I just sent, there is: +This feature works by recording the mtime of the working tree +directories and then omitting reading directories and stat calls +against files in those directories whose mtime hasn't changed. I hope it is better. Thanks, Christian.