Subject: Re: bug#61577: 30.0.50; project-try-vc missing vc-got
From: Dmitry Gutov <[email-masked]>
To: Omar Polo <[email-masked]>, [email-masked]
Date: Sat, 18 Feb 2023 01:11:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 29.1

Hi!

On 17/02/2023 18:56, Omar Polo wrote:

> project-try-vc (IIRC) used to loop over all the vc-backends to find the
> root of a project.  Now, it’s just an hardcoded list in a local
> variable.  This breaks the project-* functions on Got checkouts.
> 
> I can imagine the reason of the change (avoid loading all the vc-*.el
> files I guess) but it would be nice for this variable to be at least
> user-configurable, otherwise we will always end up with missing entries.

The reasons were actually related to performance during the search.

> (Yeah, one could add their own hooks in project-find-functions for
> that, but seems replicating stuff that project.el tries to do anyway.)
> 
> Attaching a diff that temporarly works around the problem by adding the
> Got -> .got mapping.

Thanks for the report, I've pushed your addition and also moved the list 
to a defvar. Not defcustom, though, to avoid encouraging people from 
changing it unnecessarily (instead of project-vc-extra-root-markers).

Originally, I figured all major backends should be covered, but it won't 
hurt to add one more, especially since vc-got is in ELPA.