diff options
author | Vicent Martà <vicent@github.com> | 2013-01-11 11:35:09 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-01-11 11:35:09 -0800 |
commit | 160e4fb792b070e14c7094893e390c53d788648c (patch) | |
tree | f5a999ef69d8ec8e8616d4a7b8b113b1f0522aa3 /src/buf_text.h | |
parent | 6e19edaa40559a53b8fbf544fe0a6d1f05096614 (diff) | |
parent | 0d65acade84a5ff2421cd52de82a8963f004d481 (diff) | |
download | libgit2-160e4fb792b070e14c7094893e390c53d788648c.tar.gz |
Merge pull request #1230 from arrbee/match-core-git-diff-binary-detection
Match binary file check of core git in diff
Diffstat (limited to 'src/buf_text.h')
-rw-r--r-- | src/buf_text.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buf_text.h b/src/buf_text.h index ae5e6ca30..458ee33c9 100644 --- a/src/buf_text.h +++ b/src/buf_text.h @@ -71,6 +71,14 @@ extern int git_buf_text_common_prefix(git_buf *buf, const git_strarray *strs); extern bool git_buf_text_is_binary(const git_buf *buf); /** + * Check quickly if buffer contains a NUL byte + * + * @param buf Buffer to check + * @return true if buffer contains a NUL byte + */ +extern bool git_buf_text_contains_nul(const git_buf *buf); + +/** * Check if a buffer begins with a UTF BOM * * @param bom Set to the type of BOM detected or GIT_BOM_NONE |