summaryrefslogtreecommitdiff
path: root/builtin/grep.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-04-19 09:08:47 +1000
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-18 16:28:28 -0700
commit7e77df39bf20f04b266f394a64c2fca54c1e5db0 (patch)
tree1209774988aeb0179e7431b22b4713f0abe830f2 /builtin/grep.c
parentutf8.c: add reencode_string_len() that can handle NULs in string (diff)
downloadtgif-7e77df39bf20f04b266f394a64c2fca54c1e5db0.tar.xz
pretty: two phase conversion for non utf-8 commits
Always assume format_commit_item() takes an utf-8 string for string handling simplicity (we can handle utf-8 strings, but can't with other encodings). If commit message is in non-utf8, or output encoding is not, then the commit is first converted to utf-8, processed, then output converted to output encoding. This of course only works with encodings that are compatible with Unicode. This also fixes the iso8859-1 test in t6006. It's supposed to create an iso8859-1 commit, but the commit content in t6006 is in UTF-8. t6006 is now converted back in UTF-8 (the downside is we can't put utf-8 strings there anymore). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/grep.c')
0 files changed, 0 insertions, 0 deletions