about summary refs log tree commit homepage
path: root/xt
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-02-21 11:17:58 +0000
committerEric Wong <e@80x24.org>2023-02-21 12:18:04 +0000
commit4ffad9b0a60f40ee9717e22000c233fcba30b30d (patch)
tree970f72ee4a9f4014ec25671c1275c07374fd4c2e /xt
parentf8cfe495cc2b89b5d20535279181fe013caf3cea (diff)
downloadpublic-inbox-4ffad9b0a60f40ee9717e22000c233fcba30b30d.tar.gz
Back in the old days, git didn't store commit encodings
and allowed messages in various encodings to enter history.
Assuming such a commit is UTF-8 trips up s/// operations
on buffers read with the `:utf8' PerlIO layer.  So clear
Perl's internal UTF-8 flag if we end up with something
which isn't valid UTF-8

An example is commit 7eb93c89651c47c8095d476251f2e4314656b292
in git.git ([PATCH] Simplify git script, 2005-09-07)
Diffstat (limited to 'xt')
-rw-r--r--xt/solver.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/xt/solver.t b/xt/solver.t
index 1b0af3d8..1f004bf5 100644
--- a/xt/solver.t
+++ b/xt/solver.t
@@ -30,6 +30,7 @@ my $todo = {
                 '96f1c7f/s/', # TODO: b=contrib/completion/git-completion.bash
                 'b76f2c0/s/?b=po/zh_CN.po',
                 'c2f3bf071ee90b01f2d629921bb04c4f798f02fa/s/', # tag
+                '7eb93c89651c47c8095d476251f2e4314656b292/s/', # non-UTF-8
         ],
 };