fast-export: differentiate between explicitly UTF-8 and implicitly UTF-8
commit57a8be2cb0cb6825d25885b34106aab79d6c9853
authorElijah Newren <newren@gmail.com>
Tue, 14 May 2019 04:31:01 +0000 (13 21:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 May 2019 07:48:56 +0000 (14 16:48 +0900)
treec346cef4f9ab713bfad8e2c04886355205cf7bde
parentccbfc96dc480a1395f2068c706f53fe0881c8356
fast-export: differentiate between explicitly UTF-8 and implicitly UTF-8

The find_encoding() function returned the encoding used by a commit
message, returning a default of git_commit_encoding (usually UTF-8).
Although the current code does not differentiate between a commit which
explicitly requested UTF-8 and one where we just assume UTF-8 because no
encoding is set, it will become important when we try to preserve the
encoding header.  Since is_encoding_utf8() returns true when passed
NULL, we can just return NULL from find_encoding() instead of returning
git_commit_encoding.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c