vendor/libgit2/src/reader.c in rugged-1.3.2.3 vs vendor/libgit2/src/reader.c in rugged-1.4.2
- old
+ new
@@ -21,11 +21,11 @@
git_reader reader;
git_tree *tree;
} tree_reader;
static int tree_reader_read(
- git_buf *out,
+ git_str *out,
git_oid *out_id,
git_filemode_t *out_filemode,
git_reader *_reader,
const char *filename)
{
@@ -40,11 +40,11 @@
goto done;
blobsize = git_blob_rawsize(blob);
GIT_ERROR_CHECK_BLOBSIZE(blobsize);
- if ((error = git_buf_set(out, git_blob_rawcontent(blob), (size_t)blobsize)) < 0)
+ if ((error = git_str_set(out, git_blob_rawcontent(blob), (size_t)blobsize)) < 0)
goto done;
if (out_id)
git_oid_cpy(out_id, git_tree_entry_id(tree_entry));
@@ -81,18 +81,18 @@
git_repository *repo;
git_index *index;
} workdir_reader;
static int workdir_reader_read(
- git_buf *out,
+ git_str *out,
git_oid *out_id,
git_filemode_t *out_filemode,
git_reader *_reader,
const char *filename)
{
workdir_reader *reader = (workdir_reader *)_reader;
- git_buf path = GIT_BUF_INIT;
+ git_str path = GIT_STR_INIT;
struct stat st;
git_filemode_t filemode;
git_filter_list *filters = NULL;
const git_index_entry *idx_entry;
git_oid id;
@@ -118,11 +118,11 @@
*/
if ((error = git_filter_list_load(&filters, reader->repo, NULL, filename,
GIT_FILTER_TO_ODB, GIT_FILTER_DEFAULT)) < 0)
goto done;
- if ((error = git_filter_list_apply_to_file(out,
+ if ((error = git_filter_list__apply_to_file(out,
filters, reader->repo, path.ptr)) < 0)
goto done;
if (out_id || reader->index) {
if ((error = git_odb_hash(&id, out->ptr, out->size, GIT_OBJECT_BLOB)) < 0)
@@ -144,11 +144,11 @@
if (out_filemode)
*out_filemode = filemode;
done:
git_filter_list_free(filters);
- git_buf_dispose(&path);
+ git_str_dispose(&path);
return error;
}
int git_reader_for_workdir(
git_reader **out,
@@ -184,11 +184,11 @@
git_repository *repo;
git_index *index;
} index_reader;
static int index_reader_read(
- git_buf *out,
+ git_str *out,
git_oid *out_id,
git_filemode_t *out_filemode,
git_reader *_reader,
const char *filename)
{
@@ -245,10 +245,10 @@
}
/* generic */
int git_reader_read(
- git_buf *out,
+ git_str *out,
git_oid *out_id,
git_filemode_t *out_filemode,
git_reader *reader,
const char *filename)
{