git/patch-ids.c

#include "git-compat-util.h"
#include "diff.h"
#include "commit.h"
#include "hash.h"
#include "hex.h"
#include "patch-ids.h"

static int patch_id_defined(struct commit *commit)
{}

int commit_patch_id(struct commit *commit, struct diff_options *options,
		    struct object_id *oid, int diff_header_only)
{}

/*
 * When we cannot load the full patch-id for both commits for whatever
 * reason, the function returns -1 (i.e. return error(...)). Despite
 * the "neq" in the name of this function, the caller only cares about
 * the return value being zero (a and b are equivalent) or non-zero (a
 * and b are different), and returning non-zero would keep both in the
 * result, even if they actually were equivalent, in order to err on
 * the side of safety.  The actual value being negative does not have
 * any significance; only that it is non-zero matters.
 */
static int patch_id_neq(const void *cmpfn_data,
			const struct hashmap_entry *eptr,
			const struct hashmap_entry *entry_or_key,
			const void *keydata UNUSED)
{}

int init_patch_ids(struct repository *r, struct patch_ids *ids)
{}

int free_patch_ids(struct patch_ids *ids)
{}

static int init_patch_id_entry(struct patch_id *patch,
			       struct commit *commit,
			       struct patch_ids *ids)
{}

struct patch_id *patch_id_iter_first(struct commit *commit,
				     struct patch_ids *ids)
{}

struct patch_id *patch_id_iter_next(struct patch_id *cur,
				    struct patch_ids *ids)
{}

int has_commit_patch_id(struct commit *commit,
			struct patch_ids *ids)
{}

struct patch_id *add_commit_patch_id(struct commit *commit,
				     struct patch_ids *ids)
{}