diff options
| author | Jason Toffaletti <[email protected]> | 2014-01-04 00:40:21 +0000 |
|---|---|---|
| committer | Jason Toffaletti <[email protected]> | 2014-01-04 00:40:21 +0000 |
| commit | e825d66fba2cb4169c7f3b0a43c491cf9e8c0738 (patch) | |
| tree | 406c3436d4912802ad92a413d3ed6b7ed8170325 /wrapper.c | |
| parent | 313e1126dd0c974910de74f1b6bbc0fdcbbfd06b (diff) | |
work in progress wrapping git_clone
Diffstat (limited to 'wrapper.c')
| -rw-r--r-- | wrapper.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -24,4 +24,18 @@ int _go_git_odb_foreach(git_odb *db, void *payload) { return git_odb_foreach(db, (git_odb_foreach_cb)&odbForEachCb, payload); } + +void _setup_callbacks(git_remote_callbacks *callbacks) { + typedef int (*progress_cb)(const char *str, int len, void *data); + typedef int (*completion_cb)(git_remote_completion_type type, void *data); + typedef int (*credentials_cb)(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *data); + typedef int (*transfer_progress_cb)(const git_transfer_progress *stats, void *data); + typedef int (*update_tips_cb)(const char *refname, const git_oid *a, const git_oid *b, void *data); + callbacks->progress = (progress_cb)progressCallback; + callbacks->completion = (completion_cb)completionCallback; + callbacks->credentials = (credentials_cb)credentialsCallback; + callbacks->transfer_progress = (transfer_progress_cb)transferProgressCallback; + callbacks->update_tips = (update_tips_cb)updateTipsCallback; +} + /* EOF */ |
