summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-06-18 12:33:34 +0100
committerGitHub <noreply@github.com>2018-06-18 12:33:34 +0100
commite212011b9872c52f6205d3a30b10f753c3108918 (patch)
treef9c802a5dbbfefe015cb0933f5cb4122b3c5f46d
parentcc9c9522102ff30ee17582205f8acc79d0309462 (diff)
parentb5818ddabd9273c71dfd248da92d1d13ac2ace42 (diff)
downloadlibgit2-e212011b9872c52f6205d3a30b10f753c3108918.tar.gz
Merge pull request #4685 from csware/no-git_buf_free
Fix last references to deprecated git_buf_free
-rw-r--r--include/git2/blob.h2
-rw-r--r--include/git2/buffer.h2
-rw-r--r--src/buffer.h2
-rw-r--r--tests/stash/save.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/include/git2/blob.h b/include/git2/blob.h
index 70204c440..ff1a4818f 100644
--- a/include/git2/blob.h
+++ b/include/git2/blob.h
@@ -105,7 +105,7 @@ GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob);
* attributes set for the blob and the content detected in it.
*
* The output is written into a `git_buf` which the caller must free
- * when done (via `git_buf_free`).
+ * when done (via `git_buf_dispose`).
*
* 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
diff --git a/include/git2/buffer.h b/include/git2/buffer.h
index 41cd126b3..c06e2b299 100644
--- a/include/git2/buffer.h
+++ b/include/git2/buffer.h
@@ -25,7 +25,7 @@ GIT_BEGIN_DECL
* caller and have the caller take responsibility for freeing that memory.
* This can be awkward if the caller does not have easy access to the same
* allocation functions that libgit2 is using. In those cases, libgit2
- * will fill in a `git_buf` and the caller can use `git_buf_free()` to
+ * will fill in a `git_buf` and the caller can use `git_buf_dispose()` to
* release it when they are done.
*
* A `git_buf` may also be used for the caller to pass in a reference to
diff --git a/src/buffer.h b/src/buffer.h
index cc77fc030..7910b6338 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -76,7 +76,7 @@ extern char *git_buf_detach(git_buf *buf);
extern int git_buf_attach(git_buf *buf, char *ptr, size_t asize);
/* Populates a `git_buf` where the contents are not "owned" by the
- * buffer, and calls to `git_buf_free` will not free the given buf.
+ * buffer, and calls to `git_buf_dispose` will not free the given buf.
*/
extern void git_buf_attach_notowned(
git_buf *buf, const char *ptr, size_t size);
diff --git a/tests/stash/save.c b/tests/stash/save.c
index 8650daec0..eaa72a89e 100644
--- a/tests/stash/save.c
+++ b/tests/stash/save.c
@@ -227,7 +227,7 @@ void test_stash_save__untracked_regression(void)
git_reference_free(head);
git_commit_free(head_commit);
- git_buf_free(&untracked_dir);
+ git_buf_dispose(&untracked_dir);
}
#define MESSAGE "Look Ma! I'm on TV!"