From: Elijah Newren Date: Tue, 14 May 2019 04:31:00 +0000 (-0700) Subject: fast-export: avoid stripping encoding header if we cannot reencode X-Git-Tag: v2.23.0-rc0~139^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ccbfc96dc480a1395f2068c706f53fe0881c8356?hp=ccbfc96dc480a1395f2068c706f53fe0881c8356 fast-export: avoid stripping encoding header if we cannot reencode When fast-export encounters a commit with an 'encoding' header, it tries to reencode in UTF-8 and then drops the encoding header. However, if it fails to reencode in UTF-8 because e.g. one of the characters in the commit message was invalid in the old encoding, then we need to retain the original encoding or otherwise we lose information needed to understand all the other (valid) characters in the original commit message. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano ---