summaryrefslogtreecommitdiff
path: root/include/git2/repository.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-12-09 10:17:47 -0800
committerRussell Belfer <rb@github.com>2013-12-11 10:57:50 -0800
commit373cf6a932a64d1cbe5f5cd8333546dcc2ca0b92 (patch)
treedb7ea9e143659e4cc6056cfb4467e29adfe81687 /include/git2/repository.h
parent26c1cb91beccb44425864bd233ed0e35f5801868 (diff)
downloadlibgit2-373cf6a932a64d1cbe5f5cd8333546dcc2ca0b92.tar.gz
Update docs for new callback return value behavior
Diffstat (limited to 'include/git2/repository.h')
-rw-r--r--include/git2/repository.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h
index c6bd4dca4..9f71d2959 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -503,14 +503,18 @@ typedef int (*git_repository_fetchhead_foreach_cb)(const char *ref_name,
void *payload);
/**
- * Call callback 'callback' for each entry in the given FETCH_HEAD file.
+ * Invoke 'callback' for each entry in the given FETCH_HEAD file.
+ *
+ * Return a non-zero value from the callback to stop the loop.
*
* @param repo A repository object
* @param callback Callback function
* @param payload Pointer to callback data (optional)
- * @return 0 on success, GIT_ENOTFOUND, GIT_EUSER or error
+ * @return 0 on success, non-zero callback return value, GIT_ENOTFOUND if
+ * there is no FETCH_HEAD file, or other error code.
*/
-GIT_EXTERN(int) git_repository_fetchhead_foreach(git_repository *repo,
+GIT_EXTERN(int) git_repository_fetchhead_foreach(
+ git_repository *repo,
git_repository_fetchhead_foreach_cb callback,
void *payload);
@@ -518,15 +522,19 @@ typedef int (*git_repository_mergehead_foreach_cb)(const git_oid *oid,
void *payload);
/**
- * If a merge is in progress, call callback 'cb' for each commit ID in the
+ * If a merge is in progress, invoke 'callback' for each commit ID in the
* MERGE_HEAD file.
*
+ * Return a non-zero value from the callback to stop the loop.
+ *
* @param repo A repository object
* @param callback Callback function
* @param payload Pointer to callback data (optional)
- * @return 0 on success, GIT_ENOTFOUND, GIT_EUSER or error
+ * @return 0 on success, non-zero callback return value, GIT_ENOTFOUND if
+ * there is no MERGE_HEAD file, or other error code.
*/
-GIT_EXTERN(int) git_repository_mergehead_foreach(git_repository *repo,
+GIT_EXTERN(int) git_repository_mergehead_foreach(
+ git_repository *repo,
git_repository_mergehead_foreach_cb callback,
void *payload);