walker.hon commit Merge branch 'sw/pull-ipv46-passthru' (c2b6135)
   1#ifndef WALKER_H
   2#define WALKER_H
   3
   4#include "remote.h"
   5
   6struct walker {
   7        void *data;
   8        int (*fetch_ref)(struct walker *, struct ref *ref);
   9        void (*prefetch)(struct walker *, unsigned char *sha1);
  10        int (*fetch)(struct walker *, unsigned char *sha1);
  11        void (*cleanup)(struct walker *);
  12        int get_tree;
  13        int get_history;
  14        int get_all;
  15        int get_verbosely;
  16        int get_recover;
  17
  18        int corrupt_object_found;
  19};
  20
  21/* Report what we got under get_verbosely */
  22__attribute__((format (printf, 2, 3)))
  23void walker_say(struct walker *walker, const char *fmt, ...);
  24
  25/* Load pull targets from stdin */
  26int walker_targets_stdin(char ***target, const char ***write_ref);
  27
  28/* Free up loaded targets */
  29void walker_targets_free(int targets, char **target, const char **write_ref);
  30
  31/* If write_ref is set, the ref filename to write the target value to. */
  32/* If write_ref_log_details is set, additional text will appear in the ref log. */
  33int walker_fetch(struct walker *impl, int targets, char **target,
  34                 const char **write_ref, const char *write_ref_log_details);
  35
  36void walker_free(struct walker *walker);
  37
  38struct walker *get_http_walker(const char *url);
  39
  40#endif /* WALKER_H */