blob: 04ffe217be67c32d378a94f90094b70b01e55548 [file] [log] [blame]
Johannes Schindelind9c66f02018-08-13 04:33:04 -07001#ifndef RANGE_DIFF_H
2#define RANGE_DIFF_H
3
Johannes Schindelinc8c5e432018-08-13 04:33:07 -07004#include "diff.h"
Jeff Kingdbbcd442020-07-28 16:23:39 -04005#include "strvec.h"
Johannes Schindelinc8c5e432018-08-13 04:33:07 -07006
Eric Sunshine25668652018-07-22 05:57:11 -04007#define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
8
Johannes Schindelinf1ce6c12021-02-05 14:46:11 +00009struct range_diff_options {
10 int creation_factor;
11 unsigned dual_color:1;
Johannes Schindelin1e79f972021-02-05 14:46:13 +000012 unsigned left_only:1, right_only:1;
Johannes Schindelinf1ce6c12021-02-05 14:46:11 +000013 const struct diff_options *diffopt; /* may be NULL */
14 const struct strvec *other_arg; /* may be NULL */
15};
16
Junio C Hamanod8981c32018-11-30 13:27:11 +090017/*
Johannes Schindelinf1ce6c12021-02-05 14:46:11 +000018 * Compare series of commits in `range1` and `range2`, and emit to the
19 * standard output.
Junio C Hamanod8981c32018-11-30 13:27:11 +090020 */
Johannes Schindelind9c66f02018-08-13 04:33:04 -070021int show_range_diff(const char *range1, const char *range2,
Johannes Schindelinf1ce6c12021-02-05 14:46:11 +000022 struct range_diff_options *opts);
Johannes Schindelind9c66f02018-08-13 04:33:04 -070023
Johannes Schindelin679b5912021-01-27 16:37:22 +000024/*
25 * Determine whether the given argument is usable as a range argument of `git
Johannes Schindelin359f0d72021-02-05 14:44:48 +000026 * range-diff`, e.g. A..B.
Johannes Schindelin679b5912021-01-27 16:37:22 +000027 */
28int is_range_diff_range(const char *arg);
29
Johannes Schindelind9c66f02018-08-13 04:33:04 -070030#endif