summaryrefslogtreecommitdiff
path: root/include/git2/patch.h
diff options
context:
space:
mode:
authorNicolas Hake <nh@nosebud.de>2014-01-22 17:51:32 +0100
committerNicolas Hake <nh@nosebud.de>2014-01-22 17:51:32 +0100
commitc05cd7924d2409741bb4cb1eb3ba843bea7ec4a2 (patch)
tree548900c29909e116ec5c3c1fe41370bef3460ac5 /include/git2/patch.h
parent450e8e9e623b8c172ba4628c146838cbf4c56519 (diff)
downloadlibgit2-c05cd7924d2409741bb4cb1eb3ba843bea7ec4a2.tar.gz
Drop git_patch_to_str
It's hard or even impossible to correctly free the string buffer allocated by git_patch_to_str in some circumstances. Drop the function so people have to use git_patch_to_buf instead - git_buf has a dedicated destructor.
Diffstat (limited to 'include/git2/patch.h')
-rw-r--r--include/git2/patch.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/include/git2/patch.h b/include/git2/patch.h
index e5dd5d8d4..1eca29d4a 100644
--- a/include/git2/patch.h
+++ b/include/git2/patch.h
@@ -234,17 +234,6 @@ GIT_EXTERN(int) git_patch_print(
/**
* Get the content of a patch as a single diff text.
*
- * @param string Allocated string; caller must free.
- * @param patch A git_patch representing changes to one file
- * @return 0 on success, <0 on failure.
- */
-GIT_EXTERN(int) git_patch_to_str(
- char **string,
- git_patch *patch);
-
-/**
- * Get the content of a patch as a single diff text.
- *
* @param out The git_buf to be filled in
* @param patch A git_patch representing changes to one file
* @return 0 on success, <0 on failure.