Skip to content

Commit a54147a

Browse files
committed
updating
1 parent 9ea6935 commit a54147a

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

git2_php_util.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,33 @@ void git2_parse_checkout_options(git_checkout_options *opts, HashTable *ht) {
103103
ARRAY_FETCH_CALLBACK(perfdata_cb, perfdata_payload);
104104
}
105105

106+
void git2_parse_fetch_options(git_fetch_options *opts, HashTable *ht) {
107+
zval *data;
108+
109+
if (ht == NULL) return; // skip if null
110+
111+
ARRAY_FETCH_OPTIONS(callbacks, git2_parse_remote_callbacks);
112+
ARRAY_FETCH_LONG(prune);
113+
ARRAY_FETCH_BOOL(update_fetchhead);
114+
ARRAY_FETCH_LONG(download_tags);
115+
ARRAY_FETCH_STRARRAY(custom_headers);
116+
}
117+
118+
void git2_parse_remote_callbacks(git_remote_callbacks *opts, HashTable *ht) {
119+
zval *data;
120+
121+
if (ht == NULL) return; // skip if null
122+
123+
ARRAY_FETCH_CALLBACK(sideband_progress, payload);
124+
ARRAY_FETCH_CALLBACK(completion, payload);
125+
ARRAY_FETCH_CALLBACK(credentials, payload);
126+
ARRAY_FETCH_CALLBACK(certificate_check, payload);
127+
ARRAY_FETCH_CALLBACK(transfer_progress, payload);
128+
ARRAY_FETCH_CALLBACK(update_tips, payload);
129+
ARRAY_FETCH_CALLBACK(pack_progress, payload);
130+
ARRAY_FETCH_CALLBACK(push_transfer_progress, payload);
131+
ARRAY_FETCH_CALLBACK(push_update_reference, payload);
132+
ARRAY_FETCH_CALLBACK(push_negotiation, payload);
133+
ARRAY_FETCH_CALLBACK(transport, payload);
134+
}
135+

git2_php_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ void git2_parse_repository_init_options(git_repository_init_options *opts, HashT
88
void git2_parse_clone_options(git_clone_options *opts, HashTable *ht);
99
void git2_parse_checkout_options(git_checkout_options *opts, HashTable *ht);
1010
void git2_parse_fetch_options(git_fetch_options *opts, HashTable *ht);
11-
void git2_parse_checkout_options(git_checkout_options *opts, HashTable *ht);
11+
void git2_parse_remote_callbacks(git_remote_callbacks *opts, HashTable *ht);
1212

1313
#endif /* GIT2_PHP_UTIL_H */

0 commit comments

Comments
 (0)