diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-11-15 19:24:05 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-15 19:24:05 +0100 |
commit | 6b8731258d06001217254ef67a3553d3fe601737 (patch) | |
tree | 8f31842c4331b0bfc784453df25955b9718b0029 /notes.c | |
parent | Merge branch 'ph/submodule-sync-recursive' (diff) | |
parent | reencode_string(): introduce and use same_encoding() (diff) | |
download | git-6b8731258d06001217254ef67a3553d3fe601737.tar.xz git-6b8731258d06001217254ef67a3553d3fe601737.zip |
Merge branch 'jc/same-encoding'
Various codepaths checked if two encoding names are the same using
ad-hoc code and some of them ended up asking iconv() to convert
between "utf8" and "UTF-8". The former is not a valid way to spell
the encoding name, but often people use it by mistake, and we
equated them in some but not all codepaths. Introduce a new helper
function to make these codepaths consistent.
* jc/same-encoding:
reencode_string(): introduce and use same_encoding()
Conflicts:
builtin/mailinfo.c
Diffstat (limited to 'notes.c')
-rw-r--r-- | notes.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1231,7 +1231,7 @@ static void format_note(struct notes_tree *t, const unsigned char *object_sha1, } if (output_encoding && *output_encoding && - strcmp(utf8, output_encoding)) { + !is_encoding_utf8(output_encoding)) { char *reencoded = reencode_string(msg, output_encoding, utf8); if (reencoded) { free(msg); |