summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-05-03 22:21:08 +0200
committernulltoken <emeric.fermas@gmail.com>2012-05-07 12:18:34 +0200
commitd1c4312a021eb165d21b7390607f2b2bcba098ae (patch)
treec305d03325fc17fcf535b6f000ffc8e7b4723c41 /include/git2/diff.h
parent9a29f8d56c37803a67af3ff4bc4c8724a126366f (diff)
downloadlibgit2-d1c4312a021eb165d21b7390607f2b2bcba098ae.tar.gz
diff: improve git_diff_blobs() documentation
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index f0f45022b..bafe6268c 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -337,6 +337,14 @@ GIT_EXTERN(int) git_diff_print_patch(
/**
* Directly run a text diff on two blobs.
+ *
+ * Compared to a file, a blob lacks some contextual information. As such, the
+ * `git_diff_file` parameters of the callbacks will be filled accordingly to the following:
+ * `mode` will be set to 0, `path` will be set to NULL. When dealing with a NULL blob, `oid`
+ * will be set to 0.
+ *
+ * When at least one of the blobs being dealt with is binary, the `git_diff_delta` binary
+ * attribute will be set to 1 and no call to the hunk_cb nor line_cb will be made.
*/
GIT_EXTERN(int) git_diff_blobs(
git_blob *old_blob,