git/commit-reach.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "commit.h"
#include "commit-graph.h"
#include "decorate.h"
#include "hex.h"
#include "prio-queue.h"
#include "ref-filter.h"
#include "revision.h"
#include "tag.h"
#include "commit-reach.h"
#include "ewah/ewok.h"

/* Remember to update object flag allocation in object.h */
#define PARENT1
#define PARENT2
#define STALE
#define RESULT

static const unsigned all_flags =;

static int compare_commits_by_gen(const void *_a, const void *_b)
{}

static int queue_has_nonstale(struct prio_queue *queue)
{}

/* all input commits in one and twos[] must have been parsed! */
static int paint_down_to_common(struct repository *r,
				struct commit *one, int n,
				struct commit **twos,
				timestamp_t min_generation,
				int ignore_missing_commits,
				struct commit_list **result)
{}

static int merge_bases_many(struct repository *r,
			    struct commit *one, int n,
			    struct commit **twos,
			    struct commit_list **result)
{}

int get_octopus_merge_bases(struct commit_list *in, struct commit_list **result)
{}

static int remove_redundant_no_gen(struct repository *r,
				   struct commit **array, int cnt)
{}

static int remove_redundant_with_gen(struct repository *r,
				     struct commit **array, int cnt)
{}

static int remove_redundant(struct repository *r, struct commit **array, int cnt)
{}

static int get_merge_bases_many_0(struct repository *r,
				  struct commit *one,
				  int n,
				  struct commit **twos,
				  int cleanup,
				  struct commit_list **result)
{}

int repo_get_merge_bases_many(struct repository *r,
			      struct commit *one,
			      int n,
			      struct commit **twos,
			      struct commit_list **result)
{}

int repo_get_merge_bases_many_dirty(struct repository *r,
				    struct commit *one,
				    int n,
				    struct commit **twos,
				    struct commit_list **result)
{}

int repo_get_merge_bases(struct repository *r,
			 struct commit *one,
			 struct commit *two,
			 struct commit_list **result)
{}

/*
 * Is "commit" a descendant of one of the elements on the "with_commit" list?
 */
int repo_is_descendant_of(struct repository *r,
			  struct commit *commit,
			  struct commit_list *with_commit)
{}

/*
 * Is "commit" an ancestor of one of the "references"?
 */
int repo_in_merge_bases_many(struct repository *r, struct commit *commit,
			     int nr_reference, struct commit **reference,
			     int ignore_missing_commits)
{}

/*
 * Is "commit" an ancestor of (i.e. reachable from) the "reference"?
 */
int repo_in_merge_bases(struct repository *r,
			struct commit *commit,
			struct commit *reference)
{}

struct commit_list *reduce_heads(struct commit_list *heads)
{}

void reduce_heads_replace(struct commit_list **heads)
{}

int ref_newer(const struct object_id *new_oid, const struct object_id *old_oid)
{}

/*
 * Mimicking the real stack, this stack lives on the heap, avoiding stack
 * overflows.
 *
 * At each recursion step, the stack items points to the commits whose
 * ancestors are to be inspected.
 */
struct contains_stack {};

static int in_commit_list(const struct commit_list *want, struct commit *c)
{}

/*
 * Test whether the candidate is contained in the list.
 * Do not recurse to find out, though, but return -1 if inconclusive.
 */
static enum contains_result contains_test(struct commit *candidate,
					  const struct commit_list *want,
					  struct contains_cache *cache,
					  timestamp_t cutoff)
{}

static void push_to_contains_stack(struct commit *candidate, struct contains_stack *contains_stack)
{}

static enum contains_result contains_tag_algo(struct commit *candidate,
					      const struct commit_list *want,
					      struct contains_cache *cache)
{}

int commit_contains(struct ref_filter *filter, struct commit *commit,
		    struct commit_list *list, struct contains_cache *cache)
{}

int can_all_from_reach_with_flag(struct object_array *from,
				 unsigned int with_flag,
				 unsigned int assign_flag,
				 time_t min_commit_date,
				 timestamp_t min_generation)
{}

int can_all_from_reach(struct commit_list *from, struct commit_list *to,
		       int cutoff_by_min_date)
{}

struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
					 struct commit **to, int nr_to,
					 unsigned int reachable_flag)
{}

define_commit_slab(bit_arrays, struct bitmap *);
static struct bit_arrays bit_arrays;

static void insert_no_dup(struct prio_queue *queue, struct commit *c)
{}

static struct bitmap *get_bit_array(struct commit *c, int width)
{}

static void free_bit_array(struct commit *c)
{}

void ahead_behind(struct repository *r,
		  struct commit **commits, size_t commits_nr,
		  struct ahead_behind_count *counts, size_t counts_nr)
{}

struct commit_and_index {};

static int compare_commit_and_index_by_generation(const void *va, const void *vb)
{}

void tips_reachable_from_bases(struct repository *r,
			       struct commit_list *bases,
			       struct commit **tips, size_t tips_nr,
			       int mark)
{}

/*
 * This slab initializes integers to zero, so use "-1" for "tip is best" and
 * "i + 1" for "bases[i] is best".
 */
define_commit_slab(best_branch_base, int);
static struct best_branch_base best_branch_base;
#define get_best(c)
#define set_best(c,v)

int get_branch_base_for_tip(struct repository *r,
			    struct commit *tip,
			    struct commit **bases,
			    size_t bases_nr)
{}