Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schubert <schu@schu.io>2013-02-14 23:20:18 +0400
committerMichael Schubert <schu@schu.io>2013-02-14 23:22:48 +0400
commita53b5e5fc31187cada9ba1f6eccf841484aede53 (patch)
tree8b33f10fee3a7377746b93f2e356389dc1bdb981 /include/git2/push.h
parenta9e1339c06795c9b5f4eb4e5b2f56b8fadf98115 (diff)
push: improve docs on success / failure of git_push_finish
Diffstat (limited to 'include/git2/push.h')
-rw-r--r--include/git2/push.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/push.h b/include/git2/push.h
index 8caf9a4ed..6dee46867 100644
--- a/include/git2/push.h
+++ b/include/git2/push.h
@@ -82,6 +82,11 @@ GIT_EXTERN(int) git_push_update_tips(git_push *push);
/**
* Actually push all given refspecs
*
+ * Note: To check if the push was successful (i.e. all remote references
+ * have been updated as requested), you need to call both
+ * `git_push_unpack_ok` and `git_push_status_foreach`. The remote
+ * repository might refused to update some or all of the references.
+ *
* @param push The push object
*
* @return 0 or an error code
@@ -100,6 +105,11 @@ GIT_EXTERN(int) git_push_unpack_ok(git_push *push);
/**
* Call callback `cb' on each status
*
+ * For each of the updated references, we receive a status report in the
+ * form of `ok refs/heads/master` or `ng refs/heads/master <msg>`.
+ * `msg != NULL` means the reference has not been updated for the given
+ * reason.
+ *
* @param push The push object
* @param cb The callback to call on each object
*