fetch-pack.hon commit tag: allow lookup_tag to handle arbitrary repositories (8bde69b)
   1#ifndef FETCH_PACK_H
   2#define FETCH_PACK_H
   3
   4#include "string-list.h"
   5#include "run-command.h"
   6#include "protocol.h"
   7#include "list-objects-filter-options.h"
   8
   9struct oid_array;
  10
  11struct fetch_pack_args {
  12        const char *uploadpack;
  13        int unpacklimit;
  14        int depth;
  15        const char *deepen_since;
  16        const struct string_list *deepen_not;
  17        struct list_objects_filter_options filter_options;
  18        const struct string_list *server_options;
  19        unsigned deepen_relative:1;
  20        unsigned quiet:1;
  21        unsigned keep_pack:1;
  22        unsigned lock_pack:1;
  23        unsigned use_thin_pack:1;
  24        unsigned fetch_all:1;
  25        unsigned stdin_refs:1;
  26        unsigned diag_url:1;
  27        unsigned verbose:1;
  28        unsigned no_progress:1;
  29        unsigned include_tag:1;
  30        unsigned stateless_rpc:1;
  31        unsigned check_self_contained_and_connected:1;
  32        unsigned self_contained_and_connected:1;
  33        unsigned cloning:1;
  34        unsigned update_shallow:1;
  35        unsigned deepen:1;
  36        unsigned from_promisor:1;
  37
  38        /*
  39         * If 1, fetch_pack() will also not modify any object flags.
  40         * This allows fetch_pack() to safely be called by any function,
  41         * regardless of which object flags it uses (if any).
  42         */
  43        unsigned no_dependents:1;
  44};
  45
  46/*
  47 * sought represents remote references that should be updated from.
  48 * On return, the names that were found on the remote will have been
  49 * marked as such.
  50 */
  51struct ref *fetch_pack(struct fetch_pack_args *args,
  52                       int fd[], struct child_process *conn,
  53                       const struct ref *ref,
  54                       const char *dest,
  55                       struct ref **sought,
  56                       int nr_sought,
  57                       struct oid_array *shallow,
  58                       char **pack_lockfile,
  59                       enum protocol_version version);
  60
  61/*
  62 * Print an appropriate error message for each sought ref that wasn't
  63 * matched.  Return 0 if all sought refs were matched, otherwise 1.
  64 */
  65int report_unmatched_refs(struct ref **sought, int nr_sought);
  66
  67#endif