summaryrefslogtreecommitdiff
path: root/include/git2/buffer.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-08-27 15:09:07 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-08-27 15:09:07 +0200
commit6a0d2b43ee4a32b2894d3c2b7c798c4eb4853534 (patch)
treea7fedcd3bffe2d021e31491b4f1f020c1bea8f88 /include/git2/buffer.h
parent8733993599d9d9a8fe1b042a1e18d6ecb9b0a0b2 (diff)
parentcb92467bc284b87c38cdf32f8803a528846d094b (diff)
downloadlibgit2-6a0d2b43ee4a32b2894d3c2b7c798c4eb4853534.tar.gz
Merge remote-tracking branch 'upstream/master' into cmn/ssh-retry
Diffstat (limited to 'include/git2/buffer.h')
-rw-r--r--include/git2/buffer.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/buffer.h b/include/git2/buffer.h
index 36a61e6c9..1c216bf3a 100644
--- a/include/git2/buffer.h
+++ b/include/git2/buffer.h
@@ -105,6 +105,22 @@ GIT_EXTERN(int) git_buf_grow(git_buf *buffer, size_t target_size);
GIT_EXTERN(int) git_buf_set(
git_buf *buffer, const void *data, size_t datalen);
+/**
+* Check quickly if buffer looks like it contains binary data
+*
+* @param buf Buffer to check
+* @return 1 if buffer looks like non-text data
+*/
+GIT_EXTERN(int) git_buf_is_binary(const git_buf *buf);
+
+/**
+* Check quickly if buffer contains a NUL byte
+*
+* @param buf Buffer to check
+* @return 1 if buffer contains a NUL byte
+*/
+GIT_EXTERN(int) git_buf_contains_nul(const git_buf *buf);
+
GIT_END_DECL
/** @} */