Skip to content

Commit b5818dd

Browse files
committed
Fix last references to deprecated git_buf_free
Signed-off-by: Sven Strickroth <email@cs-ware.de>
1 parent 96882f2 commit b5818dd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

include/git2/blob.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob);
105105
* attributes set for the blob and the content detected in it.
106106
*
107107
* The output is written into a `git_buf` which the caller must free
108-
* when done (via `git_buf_free`).
108+
* when done (via `git_buf_dispose`).
109109
*
110110
* If no filters need to be applied, then the `out` buffer will just
111111
* be populated with a pointer to the raw content of the blob. In

include/git2/buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GIT_BEGIN_DECL
2525
* caller and have the caller take responsibility for freeing that memory.
2626
* This can be awkward if the caller does not have easy access to the same
2727
* allocation functions that libgit2 is using. In those cases, libgit2
28-
* will fill in a `git_buf` and the caller can use `git_buf_free()` to
28+
* will fill in a `git_buf` and the caller can use `git_buf_dispose()` to
2929
* release it when they are done.
3030
*
3131
* A `git_buf` may also be used for the caller to pass in a reference to

src/buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extern char *git_buf_detach(git_buf *buf);
7676
extern int git_buf_attach(git_buf *buf, char *ptr, size_t asize);
7777

7878
/* Populates a `git_buf` where the contents are not "owned" by the
79-
* buffer, and calls to `git_buf_free` will not free the given buf.
79+
* buffer, and calls to `git_buf_dispose` will not free the given buf.
8080
*/
8181
extern void git_buf_attach_notowned(
8282
git_buf *buf, const char *ptr, size_t size);

tests/stash/save.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void test_stash_save__untracked_regression(void)
227227

228228
git_reference_free(head);
229229
git_commit_free(head_commit);
230-
git_buf_free(&untracked_dir);
230+
git_buf_dispose(&untracked_dir);
231231
}
232232

233233
#define MESSAGE "Look Ma! I'm on TV!"

0 commit comments

Comments
 (0)