From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: A project-files implementation for Git projects Date: Tue, 10 Sep 2019 09:56:44 -0400 Message-ID: References: <8736h9rdc4.fsf@gnu.org> <87mufcfz1u.fsf@gnu.org> <87tv9kz2x6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="151183"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 10 15:57:06 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i7gdg-000d1s-Vq for ged-emacs-devel@m.gmane.org; Tue, 10 Sep 2019 15:57:01 +0200 Original-Received: from localhost ([::1]:40044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7gdf-0003G6-0G for ged-emacs-devel@m.gmane.org; Tue, 10 Sep 2019 09:56:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45177) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7gdX-0003DR-0O for emacs-devel@gnu.org; Tue, 10 Sep 2019 09:56:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7gdV-0006xy-5X for emacs-devel@gnu.org; Tue, 10 Sep 2019 09:56:50 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26111) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7gdU-0006xh-Vf; Tue, 10 Sep 2019 09:56:49 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 035E6100DCA; Tue, 10 Sep 2019 09:56:48 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 74551100967; Tue, 10 Sep 2019 09:56:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1568123806; bh=etKap9aZdTOuVpP/3TN+sIZAOd7wDbMQBt0K2kD5vv4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=pjqy7g0qFLU7p4rFS7qB7I3EF+fo/U8r9fYdVRcoluPMIoAsdy/cmbmokiHRlz2G9 4pSh/CsgKmgvZRp+uC9kGOwwv6V+LqS/iDGKdOBLh5lwmb9+3sox46QYUUZDcZYMMf y2tHZNV55zGujmzVQO8LjqBOZdbALmcdDpK2YCx7rpFKKNQkoq54S8wz1fWJsvcdmq j8QhL3etnuGISrqOEzglKMwmv13npI0c7rb2JTfUJFbZL7dhuRzauX1BmrfT5b1OPS wGvT6gB/oQhf9s83XCsmVeJQT3Q23DUDNqo/xMS+536O9l5yaOaIBqr3yjafnSMhQR Ooy4v3/0KM4rw== Original-Received: from pastel (unknown [108.175.224.31]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EC4F4120924; Tue, 10 Sep 2019 09:56:45 -0400 (EDT) In-Reply-To: <87tv9kz2x6.fsf@gnu.org> (Tassilo Horn's message of "Tue, 10 Sep 2019 15:39:01 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239978 Archived-At: >> For all backends for which you want to implement the feature yes. For >> the rest, you define `vc-default-list-files` instead. > > But what should this do? From a vc list-files function I'd expect (and > document) that it lists all and only tracked files. So should the > default implementation use find to locate all files and then check each > one if it is tracked using vc-state (or something alike)? I'd pass it a "fallback" function, so you'd have something like: (defun vc-default-list-files-fast (backend ... fallback) (funcall fallback)) and in the call you'd do (vc-call-backend (vc-responsible-backend dir) 'list-files-fast ... #'cl-call-next-method) >> IIRC, vc.el calls vc-backend with the directory name in those cases. > (vc-backend "~/Repos/el/emacs") => nil > But that's my emacs git checkout... Ah, indeed, it seems you want vc-responsible-backend instead. Stefan