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