[Top][All Lists]

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

Re: A project-files implementation for Git projects

From: Stefan Monnier
Subject: Re: A project-files implementation for Git projects
Date: Tue, 10 Sep 2019 09:56:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> 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 ... 

>> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]