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> |
||
|---|---|---|
| .. | ||
| add.c | ||
| annotate.c | ||
| apply.c | ||
| archive.c | ||
| bisect--helper.c | ||
| blame.c | ||
| branch.c | ||
| bundle.c | ||
| cat-file.c | ||
| check-attr.c | ||
| check-ref-format.c | ||
| checkout-index.c | ||
| checkout.c | ||
| clean.c | ||
| clone.c | ||
| commit-tree.c | ||
| commit.c | ||
| config.c | ||
| count-objects.c | ||
| describe.c | ||
| diff-files.c | ||
| diff-index.c | ||
| diff-tree.c | ||
| diff.c | ||
| fast-export.c | ||
| fetch-pack.c | ||
| fetch.c | ||
| fmt-merge-msg.c | ||
| for-each-ref.c | ||
| fsck.c | ||
| gc.c | ||
| grep.c | ||
| hash-object.c | ||
| help.c | ||
| index-pack.c | ||
| init-db.c | ||
| log.c | ||
| ls-files.c | ||
| ls-remote.c | ||
| ls-tree.c | ||
| mailinfo.c | ||
| mailsplit.c | ||
| merge-base.c | ||
| merge-file.c | ||
| merge-index.c | ||
| merge-ours.c | ||
| merge-recursive.c | ||
| merge-tree.c | ||
| merge.c | ||
| mktag.c | ||
| mktree.c | ||
| mv.c | ||
| name-rev.c | ||
| notes.c | ||
| pack-objects.c | ||
| pack-redundant.c | ||
| pack-refs.c | ||
| patch-id.c | ||
| prune-packed.c | ||
| prune.c | ||
| push.c | ||
| read-tree.c | ||
| receive-pack.c | ||
| reflog.c | ||
| remote-ext.c | ||
| remote-fd.c | ||
| remote.c | ||
| replace.c | ||
| rerere.c | ||
| reset.c | ||
| rev-list.c | ||
| rev-parse.c | ||
| revert.c | ||
| rm.c | ||
| send-pack.c | ||
| shortlog.c | ||
| show-branch.c | ||
| show-ref.c | ||
| stripspace.c | ||
| symbolic-ref.c | ||
| tag.c | ||
| tar-tree.c | ||
| unpack-file.c | ||
| unpack-objects.c | ||
| update-index.c | ||
| update-ref.c | ||
| update-server-info.c | ||
| upload-archive.c | ||
| var.c | ||
| verify-pack.c | ||
| verify-tag.c | ||
| write-tree.c | ||