range-diff/format-patch: refactor check for commit range
[git] / range-diff.h
1 #ifndef RANGE_DIFF_H
2 #define RANGE_DIFF_H
3
4 #include "diff.h"
5 #include "strvec.h"
6
7 #define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
8
9 /*
10  * Compare series of commits in RANGE1 and RANGE2, and emit to the
11  * standard output.  NULL can be passed to DIFFOPT to use the built-in
12  * default.
13  */
14 int show_range_diff(const char *range1, const char *range2,
15                     int creation_factor, int dual_color,
16                     const struct diff_options *diffopt,
17                     const struct strvec *other_arg);
18
19 /*
20  * Determine whether the given argument is usable as a range argument of `git
21  * range-diff`, e.g. A..B. Note that this only validates the format but does
22  * _not_ parse it, i.e. it does _not_ look up the specified commits in the
23  * local repository.
24  */
25 int is_range_diff_range(const char *arg);
26
27 #endif