Subject: Re: bug#76187: vc-git-test-dir-branch-headers failure on Fedora

From: Kévin Le Gouguec <[email-masked]>
Date: Mon, 17 Feb 2025 22:11:02 +0100

Dmitry Gutov <[email-masked]> writes:

>> Paul Eggert<[email-masked]> writes:
>> 
>>> On 2025-02-15 14:17, Kévin Le Gouguec wrote:
>>>> Either fixes the issue, as far as I can validate.  I still have a slight
>>>> preference for the second one
>>> ... and the second one tests faster, so that's a good argument for going with it.
>> Right.
>> Waiting on Dmitry's thoughts before installing; OT1H I have no qualms
>> about this testcase invoking backend functions directly (just noticed
>> that there is a precedent, e.g. vc-git-test-annotate-time), OTOH maybe
>> this is not a practice we want to encourage.
>
> Thanks for the investigation, and I agree that the patch that "ditches vc-dir entirely" is TRT.
>
> The vc-<backend>-tests.el files are supposed (or at least are allowed) to test backend-specific functionality.

Thanks for weighing in on this!  I therefore installed the patch that
invokes vc-git-dir-extra-headers directly.  Boldly closing this now.

> We currently call vc-dir from vc-bzr-tests as well (helps with code coverage) - which BTW has this workaround:
>
>       (while (vc-dir-busy)
>         (sit-for 0.1))

(🤦 Would that I had thought of grepping the tests for vc-dir(-busy),
instead of reinventing the square wheel and wasting everyone's time…)