diff options
author | Russell Belfer <rb@github.com> | 2013-09-11 22:00:36 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-17 09:31:45 -0700 |
commit | a9f51e430fef49b3299ec33c11a4e6623e3f58cc (patch) | |
tree | a3162a8bcf71628f0750d5560923e7783be38eca /include/git2/blob.h | |
parent | 4b11f25a4fbb6952284e037a70e2d61fde841ab6 (diff) | |
download | libgit2-a9f51e430fef49b3299ec33c11a4e6623e3f58cc.tar.gz |
Merge git_buf and git_buffer
This makes the git_buf struct that was used internally into an
externally available structure and eliminates the git_buffer.
As part of that, some of the special cases that arose with the
externally used git_buffer were blended into the git_buf, such as
being careful about git_buf objects that may have a NULL ptr and
allowing for bufs with a valid ptr and size but zero asize as a
way of referring to externally owned data.
Diffstat (limited to 'include/git2/blob.h')
-rw-r--r-- | include/git2/blob.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/git2/blob.h b/include/git2/blob.h index dcb815b2f..dcab4fbe0 100644 --- a/include/git2/blob.h +++ b/include/git2/blob.h @@ -104,17 +104,17 @@ GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob); * CRLF filtering or other types of changes depending on the file * attributes set for the blob and the content detected in it. * - * The output is written into a `git_buffer` which the caller must free - * when done (via `git_buffer_free`). + * The output is written into a `git_buf` which the caller must free + * when done (via `git_buf_free`). * * If no filters need to be applied, then the `out` buffer will just be * populated with a pointer to the raw content of the blob. In that case, * be careful to *not* free the blob until done with the buffer. To keep - * the data detached from the blob, call `git_buffer_resize` on the buffer + * the data detached from the blob, call `git_buf_grow` on the buffer * with a `want_size` of 0 and the buffer will be reallocated to be * detached from the blob. * - * @param out The git_buffer to be filled in + * @param out The git_buf to be filled in * @param blob Pointer to the blob * @param as_path Path used for file attribute lookups, etc. * @param check_for_binary_data Should this test if blob content contains @@ -122,7 +122,7 @@ GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob); * @return 0 on success or an error code */ GIT_EXTERN(int) git_blob_filtered_content( - git_buffer *out, + git_buf *out, git_blob *blob, const char *as_path, int check_for_binary_data); |