Skip to content

Commit b474be8

Browse files
committedJan 16, 2014
[diff] add diff_options interchange functions
1 parent 23e1240 commit b474be8

17 files changed

+130
-32
lines changed
 

‎attr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_attr_foreach, 0, 0, 5)
5050
ZEND_ARG_INFO(0, flags)
5151
ZEND_ARG_INFO(0, path)
5252
ZEND_ARG_INFO(0, callback)
53-
ZEND_ARG_INFO(0, payload)
53+
ZEND_ARG_INFO(1, payload)
5454
ZEND_END_ARG_INFO()
5555

5656
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_attr_cache_flush, 0, 0, 1)

‎cred.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_cred_userpass, 0, 0, 4)
5757
ZEND_ARG_INFO(0, url)
5858
ZEND_ARG_INFO(0, user_from_url)
5959
ZEND_ARG_INFO(0, allowed_types)
60-
ZEND_ARG_INFO(0, payload)
60+
ZEND_ARG_INFO(1, payload)
6161
ZEND_END_ARG_INFO()
6262

6363
/* {{{ proto long git_cred_has_username(cred)

‎diff.c

+101-11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,79 @@
22
#include "php_git2_priv.h"
33
#include "diff.h"
44

5+
6+
static void php_git2_array_to_git_diff_options(git_diff_options *options, zval *array TSRMLS_DC)
7+
{
8+
git_diff_options_init(options, GIT_DIFF_OPTIONS_VERSION);
9+
10+
options->version = php_git2_read_arrval_long(array, ZEND_STRS("version") TSRMLS_CC);
11+
options->flags = php_git2_read_arrval_long(array, ZEND_STRS("flags") TSRMLS_CC);
12+
options->ignore_submodules = php_git2_read_arrval_long(array, ZEND_STRS("ignore_submodules") TSRMLS_CC);
13+
14+
php_git2_array_to_strarray(&options->pathspec, php_git2_read_arrval(array, ZEND_STRS("pathspec") TSRMLS_CC) TSRMLS_CC);
15+
// TODO(chobie): support notify cb
16+
17+
18+
options->context_lines = php_git2_read_arrval_long(array, ZEND_STRS("context_lines") TSRMLS_CC);
19+
options->interhunk_lines = php_git2_read_arrval_long(array, ZEND_STRS("interhunk_lines") TSRMLS_CC);
20+
options->oid_abbrev = php_git2_read_arrval_long(array, ZEND_STRS("oid_abbrev") TSRMLS_CC);
21+
options->max_size = php_git2_read_arrval_long(array, ZEND_STRS("max_size") TSRMLS_CC);
22+
options->old_prefix = php_git2_read_arrval_string(array, ZEND_STRS("old_prefix") TSRMLS_CC);
23+
options->new_prefix = php_git2_read_arrval_string(array, ZEND_STRS("new_prefix") TSRMLS_CC);
24+
}
25+
26+
static void php_git2_git_diff_options_free(git_diff_options *options)
27+
{
28+
if (options->pathspec.count > 0) {
29+
efree(options->pathspec.strings);
30+
}
31+
}
32+
33+
static void php_git2_git_diff_options_to_array(git_diff_options *options, zval **out TSRMLS_DC)
34+
{
35+
zval *result, *pathspec;
36+
37+
MAKE_STD_ZVAL(result);
38+
array_init(result);
39+
add_assoc_long_ex(result, ZEND_STRS("version"), options->version);
40+
add_assoc_long_ex(result, ZEND_STRS("flags"), options->flags);
41+
add_assoc_long_ex(result, ZEND_STRS("ignore_submodules"), options->ignore_submodules);
42+
43+
MAKE_STD_ZVAL(pathspec);
44+
array_init(pathspec);
45+
if (options->pathspec.count > 0) {
46+
} else {
47+
add_assoc_zval_ex(result, ZEND_STRS("pathspec"), pathspec);
48+
}
49+
50+
if (options->notify_cb) {
51+
} else {
52+
add_assoc_null_ex(result, ZEND_STRS("notify_cb"));
53+
}
54+
55+
add_assoc_long_ex(result, ZEND_STRS("context_lines"), options->context_lines);
56+
add_assoc_long_ex(result, ZEND_STRS("interhunk_lines"), options->interhunk_lines);
57+
add_assoc_long_ex(result, ZEND_STRS("oid_abbrev"), options->oid_abbrev);
58+
add_assoc_long_ex(result, ZEND_STRS("max_size"), options->max_size);
59+
if (options->notify_payload) {
60+
} else {
61+
add_assoc_null_ex(result, ZEND_STRS("notify_payload"));
62+
}
63+
if (options->old_prefix) {
64+
add_assoc_string_ex(result, ZEND_STRS("old_prefix"), options->old_prefix, 1);
65+
} else {
66+
add_assoc_null_ex(result, ZEND_STRS("old_prefix"));
67+
}
68+
if (options->new_prefix) {
69+
add_assoc_string_ex(result, ZEND_STRS("new_prefix"), options->new_prefix, 1);
70+
} else {
71+
add_assoc_null_ex(result, ZEND_STRS("new_prefix"));
72+
}
73+
74+
*out = result;
75+
}
76+
77+
578
static int php_git2_git_diff_file_cb(
679
const git_diff_delta *delta,
780
float progress,
@@ -110,8 +183,8 @@ PHP_FUNCTION(git_diff_tree_to_tree)
110183
php_git2_t *_new_tree = NULL;
111184
zval *opts = NULL;
112185
int error = 0;
186+
git_diff_options options = {0};
113187

114-
/* TODO(chobie): generate converter */
115188
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
116189
"rrra", &repo, &old_tree, &new_tree, &opts) == FAILURE) {
117190
return;
@@ -120,7 +193,9 @@ PHP_FUNCTION(git_diff_tree_to_tree)
120193
ZEND_FETCH_RESOURCE(_repo, php_git2_t*, &repo, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
121194
ZEND_FETCH_RESOURCE(_old_tree, php_git2_t*, &old_tree, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
122195
ZEND_FETCH_RESOURCE(_new_tree, php_git2_t*, &new_tree, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
196+
php_git2_array_to_git_diff_options(&options, opts TSRMLS_CC);
123197
result = git_diff_tree_to_tree(&diff, PHP_GIT2_V(_repo, repository), PHP_GIT2_V(_old_tree, tree), PHP_GIT2_V(_new_tree, tree), opts);
198+
php_git2_git_diff_options_free(&options);
124199
RETURN_LONG(result);
125200
}
126201
/* }}} */
@@ -134,8 +209,8 @@ PHP_FUNCTION(git_diff_tree_to_index)
134209
git_diff *diff = NULL;
135210
zval *repo = NULL, *old_tree = NULL, *index = NULL, *opts = NULL;
136211
php_git2_t *_repo = NULL, *_old_tree = NULL, *_index = NULL, *_diff = NULL;
212+
git_diff_options options = {0};
137213

138-
/* TODO(chobie): convert options */
139214
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
140215
"rrra", &repo, &old_tree, &index, &opts) == FAILURE) {
141216
return;
@@ -144,7 +219,9 @@ PHP_FUNCTION(git_diff_tree_to_index)
144219
ZEND_FETCH_RESOURCE(_repo, php_git2_t*, &repo, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
145220
ZEND_FETCH_RESOURCE(_old_tree, php_git2_t*, &old_tree, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
146221
ZEND_FETCH_RESOURCE(_index, php_git2_t*, &index, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
222+
php_git2_array_to_git_diff_options(&options, opts TSRMLS_CC);
147223
result = git_diff_tree_to_index(&diff, PHP_GIT2_V(_repo, repository), PHP_GIT2_V(_old_tree, tree), PHP_GIT2_V(_index, index), opts);
224+
php_git2_git_diff_options_free(&options);
148225
if (php_git2_make_resource(&_diff, PHP_GIT2_TYPE_DIFF, diff, 0 TSRMLS_CC)) {
149226
RETURN_FALSE;
150227
}
@@ -161,6 +238,7 @@ PHP_FUNCTION(git_diff_index_to_workdir)
161238
git_diff *diff = NULL;
162239
zval *repo = NULL, *index = NULL, *opts = NULL;
163240
php_git2_t *_repo = NULL, *_index = NULL, *_diff = NULL;
241+
git_diff_options options = {0};
164242

165243
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
166244
"rra", &repo, &index, &opts) == FAILURE) {
@@ -169,7 +247,9 @@ PHP_FUNCTION(git_diff_index_to_workdir)
169247

170248
ZEND_FETCH_RESOURCE(_repo, php_git2_t*, &repo, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
171249
ZEND_FETCH_RESOURCE(_index, php_git2_t*, &index, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
250+
php_git2_array_to_git_diff_options(&options, opts TSRMLS_CC);
172251
result = git_diff_index_to_workdir(&diff, PHP_GIT2_V(_repo, repository), PHP_GIT2_V(_index, index), opts);
252+
php_git2_git_diff_options_free(&options);
173253
if (php_git2_make_resource(&_diff, PHP_GIT2_TYPE_DIFF, diff, 0 TSRMLS_CC)) {
174254
RETURN_FALSE;
175255
}
@@ -185,6 +265,7 @@ PHP_FUNCTION(git_diff_tree_to_workdir)
185265
git_diff *diff = NULL;
186266
zval *repo = NULL, *old_tree = NULL, *opts = NULL;
187267
php_git2_t *_repo = NULL, *_old_tree = NULL, *_result;
268+
git_diff_options options = {0};
188269

189270
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
190271
"rra", &repo, &old_tree, &opts) == FAILURE) {
@@ -193,7 +274,9 @@ PHP_FUNCTION(git_diff_tree_to_workdir)
193274

194275
ZEND_FETCH_RESOURCE(_repo, php_git2_t*, &repo, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
195276
ZEND_FETCH_RESOURCE(_old_tree, php_git2_t*, &old_tree, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
196-
result = git_diff_tree_to_workdir(&diff, PHP_GIT2_V(_repo, repository), PHP_GIT2_V(_old_tree, tree), NULL);
277+
php_git2_array_to_git_diff_options(&options, opts TSRMLS_CC);
278+
result = git_diff_tree_to_workdir(&diff, PHP_GIT2_V(_repo, repository), PHP_GIT2_V(_old_tree, tree), &options);
279+
php_git2_git_diff_options_free(&options);
197280

198281
if (php_git2_make_resource(&_result, PHP_GIT2_TYPE_DIFF, diff, 0 TSRMLS_CC)) {
199282
RETURN_FALSE;
@@ -210,6 +293,7 @@ PHP_FUNCTION(git_diff_tree_to_workdir_with_index)
210293
git_diff *diff = NULL;
211294
zval *repo = NULL, *old_tree = NULL, *opts = NULL;
212295
php_git2_t *_repo = NULL, *_old_tree = NULL, *_diff = NULL;
296+
git_diff_options options = {0};
213297

214298
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
215299
"rra", &repo, &old_tree, &opts) == FAILURE) {
@@ -218,7 +302,9 @@ PHP_FUNCTION(git_diff_tree_to_workdir_with_index)
218302

219303
ZEND_FETCH_RESOURCE(_repo, php_git2_t*, &repo, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
220304
ZEND_FETCH_RESOURCE(_old_tree, php_git2_t*, &old_tree, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
305+
php_git2_array_to_git_diff_options(&options, opts TSRMLS_CC);
221306
result = git_diff_tree_to_workdir_with_index(&diff, PHP_GIT2_V(_repo, repository), PHP_GIT2_V(_old_tree, tree), opts);
307+
php_git2_git_diff_options_free(&options);
222308
if (php_git2_make_resource(&_diff, PHP_GIT2_TYPE_DIFF, diff, 0 TSRMLS_CC)) {
223309
RETURN_FALSE;
224310
}
@@ -255,6 +341,7 @@ PHP_FUNCTION(git_diff_find_similar)
255341
php_git2_t *_diff = NULL;
256342
zval *options = NULL;
257343
int error = 0;
344+
git_diff_options _options = {0};
258345

259346
/* TODO(chobie): generate converter */
260347
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
@@ -263,28 +350,31 @@ PHP_FUNCTION(git_diff_find_similar)
263350
}
264351

265352
ZEND_FETCH_RESOURCE(_diff, php_git2_t*, &diff, -1, PHP_GIT2_RESOURCE_NAME, git2_resource_handle);
266-
result = git_diff_find_similar(PHP_GIT2_V(_diff, diff), options);
353+
php_git2_array_to_git_diff_options(&_options, options TSRMLS_CC);
354+
result = git_diff_find_similar(PHP_GIT2_V(_diff, diff), &_options);
355+
php_git2_git_diff_options_free(&_options);
267356
RETURN_LONG(result);
268357
}
269358
/* }}} */
270359

271-
/* {{{ proto long git_diff_options_init( $options, long $version)
360+
/* {{{ proto long git_diff_options_init(long $version)
272361
*/
273362
PHP_FUNCTION(git_diff_options_init)
274363
{
275364
int result = 0;
276-
zval *options = NULL;
277-
long version = 0;
365+
git_diff_options options = {0};
366+
long version = GIT_DIFF_OPTIONS_VERSION;
367+
zval *out;
278368
int error = 0;
279369

280-
/* TODO(chobie): generate converter */
281370
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
282-
"al", &options, &version) == FAILURE) {
371+
"|l", &version) == FAILURE) {
283372
return;
284373
}
285374

286-
result = git_diff_options_init(options, version);
287-
RETURN_LONG(result);
375+
result = git_diff_options_init(&options, version);
376+
php_git2_git_diff_options_to_array(&options, &out TSRMLS_CC);
377+
RETURN_ZVAL(out, 0, 1);
288378
}
289379
/* }}} */
290380

‎diff.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_diff_blobs, 0, 0, 9)
123123
ZEND_ARG_INFO(0, file_cb)
124124
ZEND_ARG_INFO(0, hunk_cb)
125125
ZEND_ARG_INFO(0, line_cb)
126-
ZEND_ARG_INFO(0, payload)
126+
ZEND_ARG_INFO(1, payload)
127127
ZEND_END_ARG_INFO()
128128

129129
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_diff_blob_to_buffer, 0, 0, 10)
@@ -136,7 +136,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_diff_blob_to_buffer, 0, 0, 10)
136136
ZEND_ARG_INFO(0, file_cb)
137137
ZEND_ARG_INFO(0, hunk_cb)
138138
ZEND_ARG_INFO(0, line_cb)
139-
ZEND_ARG_INFO(0, payload)
139+
ZEND_ARG_INFO(1, payload)
140140
ZEND_END_ARG_INFO()
141141

142142
/* {{{ proto void git_diff_free(diff)

‎filter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ZEND_END_ARG_INFO()
6666
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_filter_list_push, 0, 0, 3)
6767
ZEND_ARG_INFO(0, fl)
6868
ZEND_ARG_INFO(0, filter)
69-
ZEND_ARG_INFO(0, payload)
69+
ZEND_ARG_INFO(1, payload)
7070
ZEND_END_ARG_INFO()
7171

7272
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_filter_list_length, 0, 0, 1)

‎g_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_config_get_multivar_foreach, 0, 0, 5)
101101
ZEND_ARG_INFO(0, name)
102102
ZEND_ARG_INFO(0, regexp)
103103
ZEND_ARG_INFO(0, callback)
104-
ZEND_ARG_INFO(0, payload)
104+
ZEND_ARG_INFO(1, payload)
105105
ZEND_END_ARG_INFO()
106106

107107
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_config_multivar_iterator_new, 0, 0, 4)

‎helper.c

+8
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ void php_git2_strarray_to_array(git_strarray *array, zval **out TSRMLS_DC)
132132

133133
MAKE_STD_ZVAL(result);
134134
array_init(result);
135+
135136
for (i = 0; i < array->count; i++) {
136137
add_next_index_string(result, array->strings[i], 1);
137138
}
@@ -212,6 +213,13 @@ void php_git2_array_to_strarray(git_strarray *out, zval *array TSRMLS_DC)
212213
HashPosition pos;
213214
zval **value;
214215

216+
if (Z_TYPE_P(array) != IS_ARRAY){
217+
return;
218+
}
219+
if (zend_hash_num_elements(Z_ARRVAL_P(array)) == 0) {
220+
return;
221+
}
222+
215223
elements = zend_hash_num_elements(Z_ARRVAL_P(array));
216224
out->strings = (char**)emalloc(sizeof(char*) * elements);
217225
out->count = elements;

‎index.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,21 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_index_add_all, 0, 0, 5)
103103
ZEND_ARG_INFO(0, pathspec)
104104
ZEND_ARG_INFO(0, flags)
105105
ZEND_ARG_INFO(0, callback)
106-
ZEND_ARG_INFO(0, payload)
106+
ZEND_ARG_INFO(1, payload)
107107
ZEND_END_ARG_INFO()
108108

109109
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_index_remove_all, 0, 0, 4)
110110
ZEND_ARG_INFO(0, index)
111111
ZEND_ARG_INFO(0, pathspec)
112112
ZEND_ARG_INFO(0, callback)
113-
ZEND_ARG_INFO(0, payload)
113+
ZEND_ARG_INFO(1, payload)
114114
ZEND_END_ARG_INFO()
115115

116116
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_index_update_all, 0, 0, 4)
117117
ZEND_ARG_INFO(0, index)
118118
ZEND_ARG_INFO(0, pathspec)
119119
ZEND_ARG_INFO(0, callback)
120-
ZEND_ARG_INFO(0, payload)
120+
ZEND_ARG_INFO(1, payload)
121121
ZEND_END_ARG_INFO()
122122

123123
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_index_find, 0, 0, 3)

‎note.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_note_foreach, 0, 0, 4)
8585
ZEND_ARG_INFO(0, repo)
8686
ZEND_ARG_INFO(0, notes_ref)
8787
ZEND_ARG_INFO(0, note_cb)
88-
ZEND_ARG_INFO(0, payload)
88+
ZEND_ARG_INFO(1, payload)
8989
ZEND_END_ARG_INFO()
9090

9191
/* {{{ proto resource git_note_iterator_new(repo, notes_ref)

‎odb.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ZEND_END_ARG_INFO()
7171
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_odb_foreach, 0, 0, 3)
7272
ZEND_ARG_INFO(0, db)
7373
ZEND_ARG_INFO(0, cb)
74-
ZEND_ARG_INFO(0, payload)
74+
ZEND_ARG_INFO(1, payload)
7575
ZEND_END_ARG_INFO()
7676

7777
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_odb_write, 0, 0, 4)

‎packbuilder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ZEND_END_ARG_INFO()
6565
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_packbuilder_foreach, 0, 0, 3)
6666
ZEND_ARG_INFO(0, pb)
6767
ZEND_ARG_INFO(0, cb)
68-
ZEND_ARG_INFO(0, payload)
68+
ZEND_ARG_INFO(1, payload)
6969
ZEND_END_ARG_INFO()
7070

7171
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_packbuilder_object_count, 0, 0, 1)

‎patch.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ ZEND_END_ARG_INFO()
9494
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_patch_print, 0, 0, 3)
9595
ZEND_ARG_INFO(0, patch)
9696
ZEND_ARG_INFO(0, print_cb)
97-
ZEND_ARG_INFO(0, payload)
97+
ZEND_ARG_INFO(1, payload)
9898
ZEND_END_ARG_INFO()
9999

100100
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_patch_to_str, 0, 0, 1)

‎reference.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_reference_foreach_glob, 0, 0, 4)
154154
ZEND_ARG_INFO(0, repo)
155155
ZEND_ARG_INFO(0, glob)
156156
ZEND_ARG_INFO(0, callback)
157-
ZEND_ARG_INFO(0, payload)
157+
ZEND_ARG_INFO(1, payload)
158158
ZEND_END_ARG_INFO()
159159

160160
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_reference_has_log, 0, 0, 1)

‎status.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_status_foreach, 0, 0, 3)
3030
ZEND_ARG_INFO(0, repo)
3131
ZEND_ARG_INFO(0, callback)
32-
ZEND_ARG_INFO(0, payload)
32+
ZEND_ARG_INFO(1, payload)
3333
ZEND_END_ARG_INFO()
3434

3535
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_status_foreach_ext, 0, 0, 4)
3636
ZEND_ARG_INFO(0, repo)
3737
ZEND_ARG_INFO(0, opts)
3838
ZEND_ARG_INFO(0, callback)
39-
ZEND_ARG_INFO(0, payload)
39+
ZEND_ARG_INFO(1, payload)
4040
ZEND_END_ARG_INFO()
4141

4242
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_status_file, 0, 0, 3)

‎submodule.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_git_submodule_foreach, 0, 0, 5)
3535
ZEND_ARG_INFO(0, repo)
3636
ZEND_ARG_INFO(0, sm)
3737
ZEND_ARG_INFO(0, name)
38-
ZEND_ARG_INFO(0, payload)
38+
ZEND_ARG_INFO(1, payload)
3939
ZEND_END_ARG_INFO()
4040

4141
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_submodule_add_setup, 0, 0, 4)

‎tag.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ ZEND_END_ARG_INFO()
122122
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_tag_foreach, 0, 0, 3)
123123
ZEND_ARG_INFO(0, repo)
124124
ZEND_ARG_INFO(0, callback)
125-
ZEND_ARG_INFO(0, payload)
125+
ZEND_ARG_INFO(1, payload)
126126
ZEND_END_ARG_INFO()
127127

128128
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_tag_peel, 0, 0, 1)

‎transport.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ ZEND_END_ARG_INFO()
4545

4646
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_transport_dummy, 0, 0, 2)
4747
ZEND_ARG_INFO(0, owner)
48-
ZEND_ARG_INFO(0, payload)
48+
ZEND_ARG_INFO(1, payload)
4949
ZEND_END_ARG_INFO()
5050

5151
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_transport_local, 0, 0, 2)
5252
ZEND_ARG_INFO(0, owner)
53-
ZEND_ARG_INFO(0, payload)
53+
ZEND_ARG_INFO(1, payload)
5454
ZEND_END_ARG_INFO()
5555

5656
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_transport_smart, 0, 0, 2)
5757
ZEND_ARG_INFO(0, owner)
58-
ZEND_ARG_INFO(0, payload)
58+
ZEND_ARG_INFO(1, payload)
5959
ZEND_END_ARG_INFO()
6060

6161
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_smart_subtransport_http, 0, 0, 1)

0 commit comments

Comments
 (0)
Please sign in to comment.