#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "config.h"
#include "copy.h"
#include "run-command.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "read-cache-ll.h"
#include "repository.h"
#include "sparse-index.h"
#include "strvec.h"
#include "strbuf.h"
#include "lockfile.h"
#include "object-file.h"
#include "object-store-ll.h"
#include "dir.h"
#include "entry.h"
#include "setup.h"
static int trust_exit_code;
static const char *const builtin_difftool_usage[] = …;
static int difftool_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
{ … }
static int print_tool_help(void)
{ … }
static int parse_index_info(char *p, int *mode1, int *mode2,
struct object_id *oid1, struct object_id *oid2,
char *status)
{ … }
static void add_path(struct strbuf *buf, size_t base_len, const char *path)
{ … }
static int use_wt_file(const char *workdir, const char *name,
struct object_id *oid)
{ … }
struct working_tree_entry { … };
static int working_tree_entry_cmp(const void *cmp_data UNUSED,
const struct hashmap_entry *eptr,
const struct hashmap_entry *entry_or_key,
const void *keydata UNUSED)
{ … }
struct pair_entry { … };
static int pair_cmp(const void *cmp_data UNUSED,
const struct hashmap_entry *eptr,
const struct hashmap_entry *entry_or_key,
const void *keydata UNUSED)
{ … }
static void add_left_or_right(struct hashmap *map, const char *path,
const char *content, int is_right)
{ … }
struct path_entry { … };
static int path_entry_cmp(const void *cmp_data UNUSED,
const struct hashmap_entry *eptr,
const struct hashmap_entry *entry_or_key,
const void *key)
{ … }
static void changed_files(struct hashmap *result, const char *index_path,
const char *workdir)
{ … }
static int ensure_leading_directories(char *path)
{ … }
static char *get_symlink(const struct object_id *oid, const char *path)
{ … }
static int checkout_path(unsigned mode, struct object_id *oid,
const char *path, const struct checkout *state)
{ … }
static void write_file_in_directory(struct strbuf *dir, size_t dir_len,
const char *path, const char *content)
{ … }
static void write_standin_files(struct pair_entry *entry,
struct strbuf *ldir, size_t ldir_len,
struct strbuf *rdir, size_t rdir_len)
{ … }
static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
struct child_process *child)
{ … }
static int run_file_diff(int prompt, const char *prefix,
struct child_process *child)
{ … }
int cmd_difftool(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }