]> git.ipfire.org Git - thirdparty/git.git/blame - walker.h
strmap: enable allocations to come from a mem_pool
[thirdparty/git.git] / walker.h
CommitLineData
30ae764b
DB
1#ifndef WALKER_H
2#define WALKER_H
3
9fc6440d
MH
4#include "remote.h"
5
30ae764b
DB
6struct walker {
7 void *data;
c13b2633 8 int (*fetch_ref)(struct walker *, struct ref *ref);
30ae764b
DB
9 void (*prefetch)(struct walker *, unsigned char *sha1);
10 int (*fetch)(struct walker *, unsigned char *sha1);
11 void (*cleanup)(struct walker *);
30ae764b 12 int get_verbosely;
7655b411 13 int get_progress;
30ae764b
DB
14 int get_recover;
15
16 int corrupt_object_found;
17};
18
19/* Report what we got under get_verbosely */
fa262cac
JK
20__attribute__((format (printf, 2, 3)))
21void walker_say(struct walker *walker, const char *fmt, ...);
30ae764b
DB
22
23/* Load pull targets from stdin */
24int walker_targets_stdin(char ***target, const char ***write_ref);
25
26/* Free up loaded targets */
27void walker_targets_free(int targets, char **target, const char **write_ref);
28
29/* If write_ref is set, the ref filename to write the target value to. */
30/* If write_ref_log_details is set, additional text will appear in the ref log. */
31int walker_fetch(struct walker *impl, int targets, char **target,
32 const char **write_ref, const char *write_ref_log_details);
33
34void walker_free(struct walker *walker);
35
888692b7 36struct walker *get_http_walker(const char *url);
30ae764b
DB
37
38#endif /* WALKER_H */