| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
MODULE = Git::Raw PACKAGE = Git::Raw::Submodule |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
void |
|
4
|
|
|
|
|
|
|
foreach(class, repo, cb) |
|
5
|
|
|
|
|
|
|
SV *class |
|
6
|
|
|
|
|
|
|
SV *repo |
|
7
|
|
|
|
|
|
|
SV *cb |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
PREINIT: |
|
10
|
|
|
|
|
|
|
int rc; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
CODE: |
|
13
|
0
|
|
|
|
|
|
git_foreach_payload payload = { |
|
14
|
0
|
|
|
|
|
|
GIT_SV_TO_PTR(Repository, repo), |
|
15
|
|
|
|
|
|
|
repo, |
|
16
|
0
|
|
|
|
|
|
git_ensure_cv(cb, "callback") |
|
17
|
|
|
|
|
|
|
}; |
|
18
|
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
rc = git_submodule_foreach(payload.repo_ptr -> repository, |
|
20
|
|
|
|
|
|
|
git_submodule_foreach_cb, &payload |
|
21
|
|
|
|
|
|
|
); |
|
22
|
0
|
0
|
|
|
|
|
if (rc != GIT_EUSER) |
|
23
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
SV * |
|
26
|
|
|
|
|
|
|
lookup(class, repo, name) |
|
27
|
|
|
|
|
|
|
SV *class |
|
28
|
|
|
|
|
|
|
SV *repo |
|
29
|
|
|
|
|
|
|
SV *name |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
PREINIT: |
|
32
|
|
|
|
|
|
|
int rc; |
|
33
|
|
|
|
|
|
|
Submodule module; |
|
34
|
|
|
|
|
|
|
Repository repo_ptr; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
CODE: |
|
37
|
0
|
|
|
|
|
|
repo_ptr = GIT_SV_TO_PTR(Repository, repo); |
|
38
|
0
|
0
|
|
|
|
|
rc = git_submodule_lookup(&module, |
|
39
|
|
|
|
|
|
|
repo_ptr -> repository, |
|
40
|
0
|
|
|
|
|
|
SvPVbyte_nolen(name)); |
|
41
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
0
|
|
|
|
|
GIT_NEW_OBJ_WITH_MAGIC( |
|
44
|
|
|
|
|
|
|
RETVAL, SvPVbyte_nolen(class), module, SvRV(repo) |
|
45
|
|
|
|
|
|
|
); |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
OUTPUT: RETVAL |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Repository |
|
50
|
|
|
|
|
|
|
open(self) |
|
51
|
|
|
|
|
|
|
Submodule self |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
PREINIT: |
|
54
|
|
|
|
|
|
|
int rc; |
|
55
|
0
|
|
|
|
|
|
git_repository *r = NULL; |
|
56
|
0
|
|
|
|
|
|
Repository repo = NULL; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
CODE: |
|
59
|
0
|
|
|
|
|
|
rc = git_submodule_open(&r, self); |
|
60
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
61
|
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
Newxz(repo, 1, git_raw_repository); |
|
63
|
0
|
|
|
|
|
|
repo -> repository = r; |
|
64
|
0
|
|
|
|
|
|
repo -> owned = 1; |
|
65
|
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
RETVAL = repo; |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
OUTPUT: RETVAL |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
void |
|
71
|
|
|
|
|
|
|
init(self, overwrite) |
|
72
|
|
|
|
|
|
|
Submodule self |
|
73
|
|
|
|
|
|
|
SV *overwrite |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
PREINIT: |
|
76
|
|
|
|
|
|
|
int rc; |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
CODE: |
|
79
|
0
|
0
|
|
|
|
|
rc = git_submodule_init(self, SvTRUE (overwrite) ? 1 : 0); |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
void |
|
83
|
|
|
|
|
|
|
update(self, init, ...) |
|
84
|
|
|
|
|
|
|
Submodule self |
|
85
|
|
|
|
|
|
|
SV *init |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
PREINIT: |
|
88
|
|
|
|
|
|
|
int rc; |
|
89
|
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
git_submodule_update_options update_opts = GIT_SUBMODULE_UPDATE_OPTIONS_INIT; |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
CODE: |
|
93
|
0
|
0
|
|
|
|
|
if (items >= 3) { |
|
94
|
0
|
|
|
|
|
|
git_hv_to_submodule_update_opts( |
|
95
|
0
|
|
|
|
|
|
git_ensure_hv(ST(2), "update_opts"), |
|
96
|
|
|
|
|
|
|
&update_opts |
|
97
|
|
|
|
|
|
|
); |
|
98
|
|
|
|
|
|
|
} |
|
99
|
0
|
0
|
|
|
|
|
rc = git_submodule_update(self, SvTRUE (init) ? 1 : 0, |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
&update_opts); |
|
101
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
SV * |
|
104
|
|
|
|
|
|
|
path(self) |
|
105
|
|
|
|
|
|
|
Submodule self |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
CODE: |
|
108
|
0
|
|
|
|
|
|
RETVAL = newSVpv (git_submodule_path(self), 0); |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
OUTPUT: RETVAL |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
SV * |
|
113
|
|
|
|
|
|
|
url(self) |
|
114
|
|
|
|
|
|
|
Submodule self |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
CODE: |
|
117
|
0
|
|
|
|
|
|
RETVAL = newSVpv (git_submodule_url(self), 0); |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
OUTPUT: RETVAL |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
SV * |
|
122
|
|
|
|
|
|
|
name(self) |
|
123
|
|
|
|
|
|
|
Submodule self |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
CODE: |
|
126
|
0
|
|
|
|
|
|
RETVAL = newSVpv (git_submodule_name(self), 0); |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
OUTPUT: RETVAL |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
void |
|
131
|
|
|
|
|
|
|
add_to_index(self) |
|
132
|
|
|
|
|
|
|
Submodule self |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
PREINIT: |
|
135
|
|
|
|
|
|
|
int rc; |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
CODE: |
|
138
|
0
|
|
|
|
|
|
rc = git_submodule_add_to_index(self, 1); |
|
139
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
void |
|
142
|
|
|
|
|
|
|
sync(self) |
|
143
|
|
|
|
|
|
|
Submodule self |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
PREINIT: |
|
146
|
|
|
|
|
|
|
int rc; |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
CODE: |
|
149
|
0
|
|
|
|
|
|
rc = git_submodule_sync(self); |
|
150
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
void |
|
153
|
|
|
|
|
|
|
reload(self) |
|
154
|
|
|
|
|
|
|
Submodule self |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
PREINIT: |
|
157
|
|
|
|
|
|
|
int rc; |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
CODE: |
|
160
|
0
|
|
|
|
|
|
rc = git_submodule_reload(self, 1); |
|
161
|
0
|
|
|
|
|
|
git_check_error(rc); |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
void |
|
164
|
|
|
|
|
|
|
DESTROY(self) |
|
165
|
|
|
|
|
|
|
Submodule self |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
CODE: |
|
168
|
0
|
|
|
|
|
|
git_submodule_free(self); |