Subject: Re: [PATCH] tests: disable fsync everywhere

From: Junio C Hamano <[email-masked]>
Date: Fri, 29 Oct 2021 10:22:12 -0700

Eric Wong <[email-masked]> writes:

> Easy repro+fix, though.  I only tested my final patch with NO_SVN_TESTS :x
> Can you squash this in or do you want a reroll?
>
> diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
> index df5a87a151..6ce2e283c8 100644
> --- a/perl/Git/SVN.pm
> +++ b/perl/Git/SVN.pm
> @@ -2274,7 +2274,7 @@ sub use_fsync {
>  	if (!defined($_use_fsync)) {
>  		my $x = $ENV{GIT_TEST_FSYNC};
>  		if (defined $x) {
> -			my $v = command_oneline('git', '-c', "test.fsync=$x",
> +			my $v = command_oneline('-c', "test.fsync=$x",
>  					qw(config --type=bool test.fsync));
>  			$_use_fsync = defined($v) ? ($v eq "true\n") : 1;
>  		}

Yuck, I should have known that command_oneline() does not want the
leading 'git'.

A sad part of the story is that this is not exactly the fault of the
interface, as the full name of the thing is Git::command_oneline(),
which makes it sufficiently clear that it is a "git" specific thing,
and Git::oneline_result_from_git_command_do_not_give_git_at_front()
is not a good sub name X-<.

Thanks for quickly diagnosing.