summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-04-25 12:13:20 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-04-25 13:25:45 +0200
commitf184836bd281efe8a656e3a9c6c2f9c040b88119 (patch)
tree084cf2dc7b85f7f4b43985590d9fff1fce7e469d /include/git2/remote.h
parent2e3a0055d136d13fba365bf2a26638f84bd32d02 (diff)
downloadlibgit2-f184836bd281efe8a656e3a9c6c2f9c040b88119.tar.gz
remote: run a callback when updating the branch tips
This allows the caller to update an internal structure or update the user output with the tips that were updated. While in the area, only try to update the ref if the value is different from its old one.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 8f49fddf1..09b927e28 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -183,12 +183,10 @@ GIT_EXTERN(void) git_remote_free(git_remote *remote);
/**
* Update the tips to the new state
*
- * Make sure that you only call this once you've successfully indexed
- * or expanded the packfile.
- *
* @param remote the remote to update
+ * @param cb callback to run on each ref update. 'a' is the old value, 'b' is then new value
*/
-GIT_EXTERN(int) git_remote_update_tips(git_remote *remote);
+GIT_EXTERN(int) git_remote_update_tips(git_remote *remote, int (*cb)(const char *refname, const git_oid *a, const git_oid *b));
/**
* Return whether a string is a valid remote URL