#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "hex.h"
#include "repository.h"
#include "tempfile.h"
#include "lockfile.h"
#include "object-store-ll.h"
#include "commit.h"
#include "tag.h"
#include "pkt-line.h"
#include "refs.h"
#include "oid-array.h"
#include "path.h"
#include "diff.h"
#include "revision.h"
#include "commit-slab.h"
#include "list-objects.h"
#include "commit-reach.h"
#include "shallow.h"
#include "statinfo.h"
#include "trace.h"
void set_alternate_shallow_file(struct repository *r, const char *path, int override)
{ … }
int register_shallow(struct repository *r, const struct object_id *oid)
{ … }
int unregister_shallow(const struct object_id *oid)
{ … }
int is_repository_shallow(struct repository *r)
{ … }
static void reset_repository_shallow(struct repository *r)
{ … }
int commit_shallow_file(struct repository *r, struct shallow_lock *lk)
{ … }
void rollback_shallow_file(struct repository *r, struct shallow_lock *lk)
{ … }
define_commit_slab(commit_depth, int *);
static void free_depth_in_slab(int **ptr)
{ … }
struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
int shallow_flag, int not_shallow_flag)
{ … }
static void show_commit(struct commit *commit, void *data)
{ … }
struct commit_list *get_shallow_commits_by_rev_list(int ac, const char **av,
int shallow_flag,
int not_shallow_flag)
{ … }
static void check_shallow_file_for_update(struct repository *r)
{ … }
#define SEEN_ONLY …
#define VERBOSE …
#define QUICK …
struct write_shallow_data { … };
static int write_one_shallow(const struct commit_graft *graft, void *cb_data)
{ … }
static int write_shallow_commits_1(struct strbuf *out, int use_pack_protocol,
const struct oid_array *extra,
unsigned flags)
{ … }
int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
const struct oid_array *extra)
{ … }
const char *setup_temporary_shallow(const struct oid_array *extra)
{ … }
void setup_alternate_shallow(struct shallow_lock *shallow_lock,
const char **alternate_shallow_file,
const struct oid_array *extra)
{ … }
static int advertise_shallow_grafts_cb(const struct commit_graft *graft, void *cb)
{ … }
void advertise_shallow_grafts(int fd)
{ … }
void prune_shallow(unsigned options)
{ … }
struct trace_key trace_shallow = …;
void prepare_shallow_info(struct shallow_info *info, struct oid_array *sa)
{ … }
void clear_shallow_info(struct shallow_info *info)
{ … }
void remove_nonexistent_theirs_shallow(struct shallow_info *info)
{ … }
define_commit_slab(ref_bitmap, uint32_t *);
#define POOL_SIZE …
struct paint_info { … };
static uint32_t *paint_alloc(struct paint_info *info)
{ … }
static void paint_down(struct paint_info *info, const struct object_id *oid,
unsigned int id)
{ … }
static int mark_uninteresting(const char *refname UNUSED,
const char *referent UNUSED,
const struct object_id *oid,
int flags UNUSED,
void *cb_data UNUSED)
{ … }
static void post_assign_shallow(struct shallow_info *info,
struct ref_bitmap *ref_bitmap,
int *ref_status);
void assign_shallow_commits_to_refs(struct shallow_info *info,
uint32_t **used, int *ref_status)
{ … }
struct commit_array { … };
static int add_ref(const char *refname UNUSED,
const char *referent UNUSED,
const struct object_id *oid,
int flags UNUSED,
void *cb_data)
{ … }
static void update_refstatus(int *ref_status, int nr, uint32_t *bitmap)
{ … }
static void post_assign_shallow(struct shallow_info *info,
struct ref_bitmap *ref_bitmap,
int *ref_status)
{ … }
int delayed_reachability_test(struct shallow_info *si, int c)
{ … }