git/t/helper/test-path-utils.c

#define USE_THE_REPOSITORY_VARIABLE

#include "test-tool.h"
#include "abspath.h"
#include "environment.h"
#include "path.h"
#include "read-cache-ll.h"
#include "setup.h"
#include "string-list.h"
#include "trace.h"
#include "utf8.h"
#include "copy.h"

/*
 * A "string_list_each_func_t" function that normalizes an entry from
 * GIT_CEILING_DIRECTORIES.  If the path is unusable for some reason,
 * die with an explanation.
 */
static int normalize_ceiling_entry(struct string_list_item *item,
				   void *data UNUSED)
{}

static void normalize_argv_string(const char **var, const char *input)
{}

struct test_data {};

/*
 * Compatibility wrappers for OpenBSD, whose basename(3) and dirname(3)
 * have const parameters.
 */
static char *posix_basename(char *path)
{}

static char *posix_dirname(char *path)
{}

static int test_function(struct test_data *data, char *(*func)(char *input),
	const char *funcname)
{}

static struct test_data basename_data[] =;

static struct test_data dirname_data[] =;

static int check_dotfile(const char *x, const char **argv,
			 int (*is_hfs)(const char *),
			 int (*is_ntfs)(const char *))
{}

static int cmp_by_st_size(const void *a, const void *b)
{}

/*
 * A very simple, reproducible pseudo-random generator. Copied from
 * `test-genrandom.c`.
 */
static uint64_t my_random_value =;

static uint64_t my_random(void)
{}

/*
 * A fast approximation of the square root, without requiring math.h.
 *
 * It uses Newton's method to approximate the solution of 0 = x^2 - value.
 */
static double my_sqrt(double value)
{}

static int protect_ntfs_hfs_benchmark(int argc, const char **argv)
{}

int cmd__path_utils(int argc, const char **argv)
{}