1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-12 17:36:08 +02:00
git/range-diff.h
Eric Sunshine 73a834e9e2 range-diff: relieve callers of low-level configuration burden
There are a number of very low-level configuration details which need to
be managed precisely to generate a proper range-diff. In particular,
'diff_options' output format, header suppression, indentation, and
dual-color mode must all be set appropriately to ensure proper behavior.

Handle these details locally in the libified range-diff back-end rather
than forcing each caller to have specialized knowledge of these
implementation details, and to avoid duplication as new callers are
added.

While at it, localize these tweaks to be active only while generating
the range-diff, so they don't clobber the caller-provided
'diff_options', which might be used beyond range-diff generation.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-14 14:27:04 -07:00

13 lines
257 B
C

#ifndef RANGE_DIFF_H
#define RANGE_DIFF_H
#include "diff.h"
#define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
int show_range_diff(const char *range1, const char *range2,
int creation_factor, int dual_color,
struct diff_options *diffopt);
#endif