summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-02-03 21:19:57 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2015-02-03 21:19:57 +0100
commit471b10bd8fc2ff37228ada82cc710304905a5cef (patch)
tree98c59fdfdef83cd670671b34d22ce0811b551a23
parentf83c19c87d6f484b72c24125aaac98bdc365c4b5 (diff)
parent3538f8f131e8ebe597c1172b381bb260ac66f1c0 (diff)
downloadlibgit2-471b10bd8fc2ff37228ada82cc710304905a5cef.tar.gz
Merge pull request #2868 from ethomson/diff_doc
diff docs: update `git_diff_delta` description
-rw-r--r--include/git2/diff.h6
-rw-r--r--include/git2/patch.h9
2 files changed, 6 insertions, 9 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 4403944f4..9fcc3bb08 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -849,9 +849,9 @@ GIT_EXTERN(size_t) git_diff_num_deltas_of_type(
/**
* Return the diff delta for an entry in the diff list.
*
- * The `git_delta` pointer points to internal data and you do not have
- * to release it when you are done with it. It will go away when the
- * `git_diff` (or any associated `git_patch`) goes away.
+ * The `git_diff_delta` pointer points to internal data and you do not
+ * have to release it when you are done with it. It will go away when
+ * the * `git_diff` (or any associated `git_patch`) goes away.
*
* Note that the flags on the delta related to whether it has binary
* content or not may not be set if there are no attributes set for the
diff --git a/include/git2/patch.h b/include/git2/patch.h
index 47c395669..790cb74fc 100644
--- a/include/git2/patch.h
+++ b/include/git2/patch.h
@@ -29,7 +29,7 @@ GIT_BEGIN_DECL
typedef struct git_patch git_patch;
/**
- * Return the diff delta and patch for an entry in the diff list.
+ * Return a patch for an entry in the diff list.
*
* The `git_patch` is a newly created object contains the text diffs
* for the delta. You have to call `git_patch_free()` when you are
@@ -40,10 +40,6 @@ typedef struct git_patch git_patch;
* created, the output will be set to NULL, and the `binary` flag will be
* set true in the `git_diff_delta` structure.
*
- * The `git_diff_delta` pointer points to internal data and you do not have
- * to release it when you are done with it. It will go away when the
- * `git_diff` and `git_patch` go away.
- *
* It is okay to pass NULL for either of the output parameters; if you pass
* NULL for the `git_patch`, then the text diff will not be calculated.
*
@@ -139,7 +135,8 @@ GIT_EXTERN(int) git_patch_from_buffers(
GIT_EXTERN(void) git_patch_free(git_patch *patch);
/**
- * Get the delta associated with a patch
+ * Get the delta associated with a patch. This delta points to internal
+ * data and you do not have to release it when you are done with it.
*/
GIT_EXTERN(const git_diff_delta *) git_patch_get_delta(const git_patch *patch);