MCPcopy Index your code
hub / github.com/git/git / loop

Function loop

walker.c:173–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173static int loop(struct walker *walker)
174{
175 struct object_list *elem;
176 struct progress *progress = NULL;
177 uint64_t nr = 0;
178
179 if (walker->get_progress)
180 progress = start_delayed_progress(the_repository,
181 _("Fetching objects"), 0);
182
183 while (process_queue) {
184 struct object *obj = process_queue->item;
185 elem = process_queue;
186 process_queue = elem->next;
187 free(elem);
188 if (!process_queue)
189 process_queue_end = &process_queue;
190
191 /* If we are not scanning this object, we placed it in
192 * the queue because we needed to fetch it first.
193 */
194 if (! (obj->flags & TO_SCAN)) {
195 if (walker->fetch(walker, &obj->oid)) {
196 stop_progress(&progress);
197 report_missing(obj);
198 return -1;
199 }
200 }
201 if (!obj->type)
202 parse_object(the_repository, &obj->oid);
203 if (process_object(walker, obj)) {
204 stop_progress(&progress);
205 return -1;
206 }
207 display_progress(progress, ++nr);
208 }
209 stop_progress(&progress);
210 return 0;
211}
212
213static int interpret_target(struct walker *walker, char *target, struct object_id *oid)
214{

Callers 1

walker_fetchFunction · 0.85

Calls 6

start_delayed_progressFunction · 0.85
stop_progressFunction · 0.85
report_missingFunction · 0.85
parse_objectFunction · 0.85
display_progressFunction · 0.85
process_objectFunction · 0.70

Tested by

no test coverage detected