GNU bug report logs -
#42966
28.0.50; vc-dir: wrong backend
Previous Next
Reported by: sds <at> gnu.org
Date: Fri, 21 Aug 2020 15:16:02 UTC
Severity: minor
Tags: fixed
Merged with 3807,
8179,
8603,
18514
Found in versions 23.3.50, 24.0.50, 24.3, 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #40 received at 42966 <at> debbugs.gnu.org (full text, mbox):
On 17.10.2020 09:06, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> On 16.10.2020 18:35, Glenn Morris wrote:
>>> See eghttps://debbugs.gnu.org/3807#21 from 11 years ago.
>>
>> Stefan's suggestion is pretty sensible.
>>
>> Though it'll require a rework of the corresponding VC backend
>> actions. Not sure if it's possible to do in a backward-compatible
>> fashion.
>
> (The suggestion is to recurse upwards and ask each backend "are you
> responsible for this directory, then?")
Or, more low-level, if we find that every backend follows the pattern of
aliasing vc-xyz-responsible-p to vc-xyz-root, and calling vc-find-root
in the latter's implementation, we could opt for creating a backend
action that returns the "witness" file name (e.g. ".git"), and then
construct a regexp from all witness file names, and pass it to
'directory-files' as MATCH. Depending on the cost of certain things,
this could end up being much faster, both locally and remotely.
> That makes sense, but it's just a performance hack, isn't it? The
> result should be the same as the less invasive "loop over all the
> backends and collect the most specific one".
Pretty much. Except it should naturally limit the traversal up the
directory tree, so it feels like a good architecture, not just a "hack".
The backward compatibility headache might not be worth it, though.
This bug report was last modified 4 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.