From 13f8b72d8c8e24215a3dd7771592b30083f1c740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Thu, 15 Dec 2011 20:47:22 +0700 Subject: Convert commit_tree() to take strbuf as message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- notes-merge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'notes-merge.h') diff --git a/notes-merge.h b/notes-merge.h index 168a6724cd..0c11b173a1 100644 --- a/notes-merge.h +++ b/notes-merge.h @@ -37,7 +37,7 @@ void init_notes_merge_options(struct notes_merge_options *o); * The resulting commit SHA1 is stored in result_sha1. */ void create_notes_commit(struct notes_tree *t, struct commit_list *parents, - const char *msg, unsigned char *result_sha1); + const struct strbuf *msg, unsigned char *result_sha1); /* * Merge notes from o->remote_ref into o->local_ref -- cgit v1.2.3