Johannes Schindelin | d9c66f0 | 2018-08-13 04:33:04 -0700 | [diff] [blame] | 1 | #ifndef RANGE_DIFF_H |
| 2 | #define RANGE_DIFF_H |
| 3 | |
Johannes Schindelin | c8c5e43 | 2018-08-13 04:33:07 -0700 | [diff] [blame] | 4 | #include "diff.h" |
Jeff King | dbbcd44 | 2020-07-28 16:23:39 -0400 | [diff] [blame] | 5 | #include "strvec.h" |
Johannes Schindelin | c8c5e43 | 2018-08-13 04:33:07 -0700 | [diff] [blame] | 6 | |
Eric Sunshine | 2566865 | 2018-07-22 05:57:11 -0400 | [diff] [blame] | 7 | #define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60 |
| 8 | |
Johannes Schindelin | f1ce6c1 | 2021-02-05 14:46:11 +0000 | [diff] [blame] | 9 | struct range_diff_options { |
| 10 | int creation_factor; |
| 11 | unsigned dual_color:1; |
Johannes Schindelin | 1e79f97 | 2021-02-05 14:46:13 +0000 | [diff] [blame] | 12 | unsigned left_only:1, right_only:1; |
Johannes Schindelin | f1ce6c1 | 2021-02-05 14:46:11 +0000 | [diff] [blame] | 13 | const struct diff_options *diffopt; /* may be NULL */ |
| 14 | const struct strvec *other_arg; /* may be NULL */ |
| 15 | }; |
| 16 | |
Junio C Hamano | d8981c3 | 2018-11-30 13:27:11 +0900 | [diff] [blame] | 17 | /* |
Johannes Schindelin | f1ce6c1 | 2021-02-05 14:46:11 +0000 | [diff] [blame] | 18 | * Compare series of commits in `range1` and `range2`, and emit to the |
| 19 | * standard output. |
Junio C Hamano | d8981c3 | 2018-11-30 13:27:11 +0900 | [diff] [blame] | 20 | */ |
Johannes Schindelin | d9c66f0 | 2018-08-13 04:33:04 -0700 | [diff] [blame] | 21 | int show_range_diff(const char *range1, const char *range2, |
Johannes Schindelin | f1ce6c1 | 2021-02-05 14:46:11 +0000 | [diff] [blame] | 22 | struct range_diff_options *opts); |
Johannes Schindelin | d9c66f0 | 2018-08-13 04:33:04 -0700 | [diff] [blame] | 23 | |
Johannes Schindelin | 679b591 | 2021-01-27 16:37:22 +0000 | [diff] [blame] | 24 | /* |
| 25 | * Determine whether the given argument is usable as a range argument of `git |
Johannes Schindelin | 359f0d7 | 2021-02-05 14:44:48 +0000 | [diff] [blame] | 26 | * range-diff`, e.g. A..B. |
Johannes Schindelin | 679b591 | 2021-01-27 16:37:22 +0000 | [diff] [blame] | 27 | */ |
| 28 | int is_range_diff_range(const char *arg); |
| 29 | |
Johannes Schindelin | d9c66f0 | 2018-08-13 04:33:04 -0700 | [diff] [blame] | 30 | #endif |