diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-05-01 11:28:54 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-05-01 11:28:54 -0400 |
| commit | cbe8a61dfacf107f49dbfc65f8385576c72fe41e (patch) | |
| tree | b0281c3c6b633dcc84ff528e2c060a4c54f91f7a /include/git2/push.h | |
| parent | 9f73e1f3353ea08ba91e4eceaec7346bc0a7d49c (diff) | |
| parent | efc2fec50e3bb725b2b244fdeacfb2dfad6ee78e (diff) | |
| download | libgit2-cbe8a61dfacf107f49dbfc65f8385576c72fe41e.tar.gz | |
Merge pull request #3059 from libgit2/cmn/negotiation-notify
[WIP/RFC] push: report the update plan to the caller
Diffstat (limited to 'include/git2/push.h')
| -rw-r--r-- | include/git2/push.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/git2/push.h b/include/git2/push.h index ecabff397..3f850453d 100644 --- a/include/git2/push.h +++ b/include/git2/push.h @@ -59,6 +59,36 @@ typedef int (*git_push_transfer_progress)( size_t bytes, void* payload); +/** + * Represents an update which will be performed on the remote during push + */ +typedef struct { + /** + * The source name of the reference + */ + char *src_refname; + /** + * The name of the reference to update on the server + */ + char *dst_refname; + /** + * The current target of the reference + */ + git_oid src; + /** + * The new target for the reference + */ + git_oid dst; +} git_push_update; + +/** + * @param updates an array containing the updates which will be sent + * as commands to the destination. + * @param len number of elements in `updates` + * @param payload Payload provided by the caller + */ +typedef int (*git_push_negotiation)(const git_push_update **updates, size_t len, void *payload); + /** @} */ GIT_END_DECL #endif |
