summaryrefslogtreecommitdiff
path: root/builtin/init-db.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-05-08 23:17:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-08 23:56:21 (GMT)
commit43acff34b902c38808ac0f326090f2516250e1f0 (patch)
treebf0e0cf529f21c35a0a42fe4cd45f9301a8e0228 /builtin/init-db.c
parente5bd0a1b362ecc4bcd03a4d3628c7e78f861f3ca (diff)
downloadgit-43acff34b902c38808ac0f326090f2516250e1f0.zip
git-43acff34b902c38808ac0f326090f2516250e1f0.tar.gz
git-43acff34b902c38808ac0f326090f2516250e1f0.tar.bz2
cherry-pick: do not dump core when iconv fails
When cherry-picking, usually the new and old commit encodings are both UTF-8. Most old iconv implementations do not support this trivial conversion, so on old platforms, out->message remains NULL, and later attempts to read it segfault. Fix this by noticing the input and output encodings match and skipping the iconv step, like the other reencode_string() call sites already do. Also stop segfaulting on other iconv failures: if iconv fails for some other reason, the best we can do is to pass the old message through. This fixes a regression introduced in v1.7.1-rc0~15^2~2 (revert: clarify label on conflict hunks, 2010-03-20). Reported-by: Andreas Krey <a.krey@gmx.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/init-db.c')
0 files changed, 0 insertions, 0 deletions