summaryrefslogtreecommitdiff
path: root/include/git2/buffer.h
diff options
context:
space:
mode:
authorAlan Rogers <alan@github.com>2014-07-22 15:08:24 +1000
committerAlan Rogers <alan@github.com>2014-07-22 15:08:24 +1000
commit7d0ab0fae04015e0bc66ff16beae495f13969b10 (patch)
tree09323e451046ef9dfa6f83754c3fe1fb3d327b48 /include/git2/buffer.h
parente824e63de6724557946ba155034ff8c864f594d2 (diff)
parent091165c53b2bcd5d41fb71d43ed5a23a3d96bf5d (diff)
downloadlibgit2-7d0ab0fae04015e0bc66ff16beae495f13969b10.tar.gz
Merge remote-tracking branch 'origin/master' into fix-git-status-list-new-unreadable-folder
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
/** @} */