mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-12 15:59:24 -06:00
In the `SPECIFYING RANGES` section of gitrevisions[7], two ways are
described to specify commit ranges that `range-diff` does not yet
accept: "<commit>^!" and "<commit>^-<n>".
Let's accept them, by parsing them via the revision machinery and
looking for at least one interesting and one uninteresting revision in
the resulting `pending` array.
This also finally lets us reject arguments that _do_ contain `..` but
are not actually ranges, e.g. `HEAD^{/do.. match this}`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
26 lines
633 B
C
26 lines
633 B
C
#ifndef RANGE_DIFF_H
|
|
#define RANGE_DIFF_H
|
|
|
|
#include "diff.h"
|
|
#include "strvec.h"
|
|
|
|
#define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
|
|
|
|
/*
|
|
* Compare series of commits in RANGE1 and RANGE2, and emit to the
|
|
* standard output. NULL can be passed to DIFFOPT to use the built-in
|
|
* default.
|
|
*/
|
|
int show_range_diff(const char *range1, const char *range2,
|
|
int creation_factor, int dual_color,
|
|
const struct diff_options *diffopt,
|
|
const struct strvec *other_arg);
|
|
|
|
/*
|
|
* Determine whether the given argument is usable as a range argument of `git
|
|
* range-diff`, e.g. A..B.
|
|
*/
|
|
int is_range_diff_range(const char *arg);
|
|
|
|
#endif
|