]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
t/solver_git: squelch non-UTF-8 commit warning
authorEric Wong <e@80x24.org>
Mon, 13 Mar 2023 20:17:14 +0000 (20:17 +0000)
committerEric Wong <e@80x24.org>
Tue, 14 Mar 2023 20:51:10 +0000 (20:51 +0000)
We're making an ISO-8859-1 commit for testing purposes, so use
i18n.commitEncoding to shut git up.

t/solver_git.t

index 00e580742bed1efdea73b82797d3a87060c14e51..9396b7a1cf87f12fe946d88c9fc135ef98f5cd93 100644 (file)
@@ -253,12 +253,13 @@ SKIP: {
                $env->{GIT_COMMITTER_NAME} = $env->{GIT_AUTHOR_NAME};
                $env->{GIT_COMMITTER_EMAIL} = $env->{GIT_AUTHOR_EMAIL};
                my $in = \"$non_utf8\n\nK\x{e5}g\n";
-               my $c = xqx([qw(git commit-tree), $t], $env, { 0 => $in });
+               my @ct = qw(git -c i18n.commitEncoding=iso-8859-1 commit-tree);
+               my $c = xqx([@ct, $t], $env, { 0 => $in });
                xbail "commit-tree: $?" if $?;
                chomp($c);
                $oid{'iso-8859-1'} = $c;
 
-               $c = xqx([qw(git commit-tree -p), $c, $t], $env, { 0 => $in });
+               $c = xqx([@ct, '-p', $c, $t], $env, { 0 => $in });
                xbail "commit-tree: $?" if $?;
                chomp($c);
                $oid{'8859-parent'} = $c;