git/refs/iterator.c

/*
 * Generic reference iterator infrastructure. See refs-internal.h for
 * documentation about the design and use of reference iterators.
 */

#include "git-compat-util.h"
#include "refs.h"
#include "refs/refs-internal.h"
#include "iterator.h"

int ref_iterator_advance(struct ref_iterator *ref_iterator)
{}

int ref_iterator_peel(struct ref_iterator *ref_iterator,
		      struct object_id *peeled)
{}

int ref_iterator_abort(struct ref_iterator *ref_iterator)
{}

void base_ref_iterator_init(struct ref_iterator *iter,
			    struct ref_iterator_vtable *vtable)
{}

void base_ref_iterator_free(struct ref_iterator *iter)
{}

struct empty_ref_iterator {};

static int empty_ref_iterator_advance(struct ref_iterator *ref_iterator)
{}

static int empty_ref_iterator_peel(struct ref_iterator *ref_iterator UNUSED,
				   struct object_id *peeled UNUSED)
{}

static int empty_ref_iterator_abort(struct ref_iterator *ref_iterator)
{}

static struct ref_iterator_vtable empty_ref_iterator_vtable =;

struct ref_iterator *empty_ref_iterator_begin(void)
{}

int is_empty_ref_iterator(struct ref_iterator *ref_iterator)
{}

struct merge_ref_iterator {};

enum iterator_selection ref_iterator_select(struct ref_iterator *iter_worktree,
					    struct ref_iterator *iter_common,
					    void *cb_data UNUSED)
{}

static int merge_ref_iterator_advance(struct ref_iterator *ref_iterator)
{}

static int merge_ref_iterator_peel(struct ref_iterator *ref_iterator,
				   struct object_id *peeled)
{}

static int merge_ref_iterator_abort(struct ref_iterator *ref_iterator)
{}

static struct ref_iterator_vtable merge_ref_iterator_vtable =;

struct ref_iterator *merge_ref_iterator_begin(
		struct ref_iterator *iter0, struct ref_iterator *iter1,
		ref_iterator_select_fn *select, void *cb_data)
{}

/*
 * A ref_iterator_select_fn that overlays the items from front on top
 * of those from back (like loose refs over packed refs). See
 * overlay_ref_iterator_begin().
 */
static enum iterator_selection overlay_iterator_select(
		struct ref_iterator *front, struct ref_iterator *back,
		void *cb_data UNUSED)
{}

struct ref_iterator *overlay_ref_iterator_begin(
		struct ref_iterator *front, struct ref_iterator *back)
{}

struct prefix_ref_iterator {};

/* Return -1, 0, 1 if refname is before, inside, or after the prefix. */
static int compare_prefix(const char *refname, const char *prefix)
{}

static int prefix_ref_iterator_advance(struct ref_iterator *ref_iterator)
{}

static int prefix_ref_iterator_peel(struct ref_iterator *ref_iterator,
				    struct object_id *peeled)
{}

static int prefix_ref_iterator_abort(struct ref_iterator *ref_iterator)
{}

static struct ref_iterator_vtable prefix_ref_iterator_vtable =;

struct ref_iterator *prefix_ref_iterator_begin(struct ref_iterator *iter0,
					       const char *prefix,
					       int trim)
{}

struct ref_iterator *current_ref_iter =;

int do_for_each_ref_iterator(struct ref_iterator *iter,
			     each_ref_fn fn, void *cb_data)
{}