unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] t/solver_git: squelch non-UTF-8 commit warning
Date: Mon, 13 Mar 2023 20:17:14 +0000	[thread overview]
Message-ID: <20230313201714.3533690-1-e@80x24.org> (raw)

We're making an ISO-8859-1 commit for testing purposes, so use
i18n.commitEncoding to shut git up.
---
 t/solver_git.t | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/solver_git.t b/t/solver_git.t
index 00e58074..9396b7a1 100644
--- a/t/solver_git.t
+++ b/t/solver_git.t
@@ -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;

                 reply	other threads:[~2023-03-13 20:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230313201714.3533690-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).