在ubuntu系统下, 使用git format-patch -1 commit_id生成的patch文件的中文是乱码
然后用file -ib 查看生成的patch文件:
text/x-diff; charset=unknow-8bit
问: 如何让生成的patch文件是
text/x-diff; charset=utf-8
现象如下:
zl@zl-VirtualBox:~/gittest$ cat 0001-1.patch
From 71c84b2efcdbdf7f48ecc3b40371564498e06e2b Mon Sep 17 00:00:00 2001
Date: Wed, 6 Oct 2021 12:38:00 +0800
Subject: [PATCH] =?utf-8?q?1.=E6=B5=8B=E8=AF=95=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
实际的中文注释是:1.测试测试