commit.c: make "tree" a const pointer in commit_tree*()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Dec 22, 2013 at 09:56 UTC 8785b7654bfbdbf718b950e86924753753548ff4
2 files changed +4 -4
commit.c
+2 -2
@@ -1349,7 +1349,7 @@ void free_commit_extra_headers(struct commit_extra_header *extra)
1349 }
1350 }
1351
1352 -int commit_tree(const struct strbuf *msg, unsigned char *tree,
1352 +int commit_tree(const struct strbuf *msg, const unsigned char *tree,
1353 struct commit_list *parents, unsigned char *ret,
1354 const char *author, const char *sign_commit)
1355 {
@@ -1478,7 +1478,7 @@ static const char commit_utf8_warn[] =
1478 "You may want to amend it after fixing the message, or set the config\n"
1479 "variable i18n.commitencoding to the encoding your project uses.\n";
1480
1481 -int commit_tree_extended(const struct strbuf *msg, unsigned char *tree,
1481 +int commit_tree_extended(const struct strbuf *msg, const unsigned char *tree,
1482 struct commit_list *parents, unsigned char *ret,
1483 const char *author, const char *sign_commit,
1484 struct commit_extra_header *extra)
commit.h
+2 -2
@@ -231,11 +231,11 @@ struct commit_extra_header {
231 extern void append_merge_tag_headers(struct commit_list *parents,
232 struct commit_extra_header ***tail);
233
234 -extern int commit_tree(const struct strbuf *msg, unsigned char *tree,
234 +extern int commit_tree(const struct strbuf *msg, const unsigned char *tree,
235 struct commit_list *parents, unsigned char *ret,
236 const char *author, const char *sign_commit);
237
238 -extern int commit_tree_extended(const struct strbuf *msg, unsigned char *tree,
238 +extern int commit_tree_extended(const struct strbuf *msg, const unsigned char *tree,
239 struct commit_list *parents, unsigned char *ret,
240 const char *author, const char *sign_commit,
241 struct commit_extra_header *);