emacs-devel
[Top][All Lists]
Advanced

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

Re: A project-files implementation for Git projects


From: Tassilo Horn
Subject: Re: A project-files implementation for Git projects
Date: Sat, 14 Sep 2019 18:26:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Dmitry Gutov <address@hidden> writes:

Hi Dmitry,

> But we should get the details right, and IMO that means no
> "differences in semantics", and it implies certain requirements on the
> new VC backend action which we'll need to consider.

Sure.

> On 11.09.2019 23:01, Tassilo Horn wrote:
>> here is a working solution for a VC list-files function.  I've added
>> implementations for Git, Hg, Bzr, and SVN plus a default
>> implementation which probably does the right thing for all other
>> handled VC backends.  I guess Monotone also has the ability to
>> quickly list all tracked files but I haven't been able to install it.
>
> I don't think there's a point in delegating to backends where the
> performance will end up being worse. Though I see you added a faster
> implementation for SVN later.

As Eli said, just stat find is faster than, e.g., "bzr ls" on my
GNU/Linux system doesn't mean much.  One benefit is that if you have a
bzr project, you'll have bzr installed.  That doesn't need to be the
case for find at least on Windows systems.

>> I also added a vc `project-files' implementation which uses the VC
>> list-files feature for backends in a new list-valued defcustom
>> `project-vc-project-files-backends'.
>
> That implementation should both include untracked files (since it's
> what we'd generally expect from it given the current Project API
> semantics) and honor project-vc-ignores (which is something a user can
> set via dir-locals, and I personally found quite useful).

Hm, git can list untracked files, list ignored files, and also get a
custom ignore pattern.

"bzr ls" has an --unknown flag which should list unknown files and an
--ignored flag to list ignored files, but in my version it then just
lists nothing when I specify either one.

"hg files" doesn't seem to have a way to list untracked files.  Same for
subversion.

> Ideally it also should allow future support for whitelisting entries
> (that override ignores returned by Git), though that's not there yet.
>
> All this makes creating new VC action more difficult, but I think we
> can do that. Maybe not for all backends, but Git for sure, which will
> help 95% of our audience.

If you have an interface in mind (i.e., list-files all arguments and
their meaning), I can try and check how far we can get.

Bye,
Tassilo



reply via email to

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