author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Thu, 15 Dec 2011 13:47:22 +0000 (20:47 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 15 Dec 2011 18:46:42 +0000 (10:46 -0800) | ||
commit | 13f8b72d8c8e24215a3dd7771592b30083f1c740 | |
tree | 090da017d258dc9d29af8c270d287f61d44b150a | tree | snapshot |
parent | 6b3c4c05475d206fafd650d8d27c82a8b051ac30 | commit | diff |
Convert commit_tree() to take strbuf as message
There wan't a way for commit_tree() to notice if the message the caller
prepared contained a NUL byte, as it did not take the length of the
message as a parameter. Use a pointer to a strbuf instead, so that we can
either choose to allow low-level plumbing commands to make commits that
contain NUL byte in its message, or forbid NUL everywhere by adding the
check in commit_tree(), in later patches.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
There wan't a way for commit_tree() to notice if the message the caller
prepared contained a NUL byte, as it did not take the length of the
message as a parameter. Use a pointer to a strbuf instead, so that we can
either choose to allow low-level plumbing commands to make commits that
contain NUL byte in its message, or forbid NUL everywhere by adding the
check in commit_tree(), in later patches.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit-tree.c | diff | blob | history | |
builtin/commit.c | diff | blob | history | |
builtin/merge.c | diff | blob | history | |
builtin/notes.c | diff | blob | history | |
commit.c | diff | blob | history | |
commit.h | diff | blob | history | |
notes-cache.c | diff | blob | history | |
notes-merge.c | diff | blob | history | |
notes-merge.h | diff | blob | history |