Blame src/diff_xdiff.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_diff_xdiff_h__
Packit Service 20376f
#define INCLUDE_diff_xdiff_h__
Packit Service 20376f
Packit Service 20376f
#include "diff.h"
Packit Service 20376f
#include "xdiff/xdiff.h"
Packit Service 20376f
#include "patch_generate.h"
Packit Service 20376f
Packit Service 20376f
/* xdiff cannot cope with large files.  these files should not be passed to
Packit Service 20376f
 * xdiff.  callers should treat these large files as binary.
Packit Service 20376f
 */
Packit Service 20376f
#define GIT_XDIFF_MAX_SIZE (1024LL * 1024 * 1023)
Packit Service 20376f
Packit Service 20376f
/* A git_xdiff_output is a git_patch_generate_output with extra fields
Packit Service 20376f
 * necessary to use libxdiff.  Calling git_xdiff_init() will set the diff_cb
Packit Service 20376f
 * field of the output to use xdiff to generate the diffs.
Packit Service 20376f
 */
Packit Service 20376f
typedef struct {
Packit Service 20376f
	git_patch_generated_output output;
Packit Service 20376f
Packit Service 20376f
	xdemitconf_t config;
Packit Service 20376f
	xpparam_t    params;
Packit Service 20376f
	xdemitcb_t   callback;
Packit Service 20376f
} git_xdiff_output;
Packit Service 20376f
Packit Service 20376f
void git_xdiff_init(git_xdiff_output *xo, const git_diff_options *opts);
Packit Service 20376f
Packit Service 20376f
#endif