Re: [PATCH] tests: disable fsync everywhere
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 29, 2021, 17:22 UTC
- Message-ID
- <xmqqtugzlpa3.fsf@gitster.g>
- In-Reply-To
- <20211029074857.GA9214@dcvr>
Eric Wong <e@80x24.org> writes:
Show 16 quoted lines
> 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.