author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Thu, 15 Dec 2011 13:47:23 +0000 (20:47 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 15 Dec 2011 19:35:10 +0000 (11:35 -0800) | ||
commit | 37576c14439a4dfa43bec5a5c953fea1cc436bbf | |
tree | ab64240830bfce6d1308787f193ff8f0f77c21c0 | tree | snapshot |
parent | 13f8b72d8c8e24215a3dd7771592b30083f1c740 | commit | diff |
commit_tree(): refuse commit messages that contain NULs
Current implementation sees NUL as terminator. If users give a message
with NUL byte in it (e.g. editor set to save as UTF-16), the new commit
message will have NULs. However following operations (displaying or
amending a commit for example) will not keep anything after the first NUL.
Stop user right when they do this. If NUL is added by mistake, they have
their chance to fix. Otherwise, log messages will no longer be text "git
log" and friends would grok.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Current implementation sees NUL as terminator. If users give a message
with NUL byte in it (e.g. editor set to save as UTF-16), the new commit
message will have NULs. However following operations (displaying or
amending a commit for example) will not keep anything after the first NUL.
Stop user right when they do this. If NUL is added by mistake, they have
their chance to fix. Otherwise, log messages will no longer be text "git
log" and friends would grok.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c | diff | blob | history | |
t/t3900-i18n-commit.sh | diff | blob | history |