git/list-objects-filter.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "dir.h"
#include "gettext.h"
#include "hex.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"
#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "oidmap.h"
#include "oidset.h"
#include "object-name.h"
#include "object-store-ll.h"

/* Remember to update object flag allocation in object.h */
/*
 * FILTER_SHOWN_BUT_REVISIT -- we set this bit on tree objects
 * that have been shown, but should be revisited if they appear
 * in the traversal (until we mark it SEEN).  This is a way to
 * let us silently de-dup calls to show() in the caller.  This
 * is subtly different from the "revision.h:SHOWN" and the
 * "object-name.c:ONELINE_SEEN" bits.  And also different from
 * the non-de-dup usage in pack-bitmap.c
 */
#define FILTER_SHOWN_BUT_REVISIT

struct subfilter {};

struct filter {};

static enum list_objects_filter_result filter_blobs_none(
	struct repository *r UNUSED,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname UNUSED,
	const char *filename UNUSED,
	struct oidset *omits,
	void *filter_data_ UNUSED)
{}

static void filter_blobs_none__init(
	struct list_objects_filter_options *filter_options UNUSED,
	struct filter *filter)
{}

/*
 * A filter for list-objects to omit ALL trees and blobs from the traversal.
 * Can OPTIONALLY collect a list of the omitted OIDs.
 */
struct filter_trees_depth_data {};

struct seen_map_entry {};

/* Returns 1 if the oid was in the omits set before it was invoked. */
static int filter_trees_update_omits(
	struct object *obj,
	struct oidset *omits,
	int include_it)
{}

static enum list_objects_filter_result filter_trees_depth(
	struct repository *r UNUSED,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname UNUSED,
	const char *filename UNUSED,
	struct oidset *omits,
	void *filter_data_)
{}

static void filter_trees_free(void *filter_data) {}

static void filter_trees_depth__init(
	struct list_objects_filter_options *filter_options,
	struct filter *filter)
{}

/*
 * A filter for list-objects to omit large blobs.
 * And to OPTIONALLY collect a list of the omitted OIDs.
 */
struct filter_blobs_limit_data {};

static enum list_objects_filter_result filter_blobs_limit(
	struct repository *r,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname UNUSED,
	const char *filename UNUSED,
	struct oidset *omits,
	void *filter_data_)
{}

static void filter_blobs_limit__init(
	struct list_objects_filter_options *filter_options,
	struct filter *filter)
{}

/*
 * A filter driven by a sparse-checkout specification to only
 * include blobs that a sparse checkout would populate.
 *
 * The sparse-checkout spec can be loaded from a blob with the
 * given OID or from a local pathname.  We allow an OID because
 * the repo may be bare or we may be doing the filtering on the
 * server.
 */
struct frame {};

struct filter_sparse_data {};

static enum list_objects_filter_result filter_sparse(
	struct repository *r,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname,
	const char *filename,
	struct oidset *omits,
	void *filter_data_)
{}


static void filter_sparse_free(void *filter_data)
{}

static void filter_sparse_oid__init(
	struct list_objects_filter_options *filter_options,
	struct filter *filter)
{}

/*
 * A filter for list-objects to omit large blobs.
 * And to OPTIONALLY collect a list of the omitted OIDs.
 */
struct filter_object_type_data {};

static enum list_objects_filter_result filter_object_type(
	struct repository *r UNUSED,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname UNUSED,
	const char *filename UNUSED,
	struct oidset *omits UNUSED,
	void *filter_data_)
{}

static void filter_object_type__init(
	struct list_objects_filter_options *filter_options,
	struct filter *filter)
{}

/* A filter which only shows objects shown by all sub-filters. */
struct combine_filter_data {};

static enum list_objects_filter_result process_subfilter(
	struct repository *r,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname,
	const char *filename,
	struct subfilter *sub)
{}

static enum list_objects_filter_result filter_combine(
	struct repository *r,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname,
	const char *filename,
	struct oidset *omits UNUSED,
	void *filter_data)
{}

static void filter_combine__free(void *filter_data)
{}

static void filter_combine__finalize_omits(
	struct oidset *omits,
	void *filter_data)
{}

static void filter_combine__init(
	struct list_objects_filter_options *filter_options,
	struct filter* filter)
{}

filter_init_fn;

/*
 * Must match "enum list_objects_filter_choice".
 */
static filter_init_fn s_filters[] =;

struct filter *list_objects_filter__init(
	struct oidset *omitted,
	struct list_objects_filter_options *filter_options)
{}

enum list_objects_filter_result list_objects_filter__filter_object(
	struct repository *r,
	enum list_objects_filter_situation filter_situation,
	struct object *obj,
	const char *pathname,
	const char *filename,
	struct filter *filter)
{}

void list_objects_filter__free(struct filter *filter)
{}