"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > diff --git a/range-diff.h b/range-diff.h > index 583ced2e8e74..c17dbc2e75a8 100644 > --- a/range-diff.h > +++ b/range-diff.h > @@ -16,4 +16,12 @@ int show_range_diff(const char *range1, const char *range2, > 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. Note that this only validates the format but does > + * _not_ parse it, i.e. it does _not_ look up the specified commits in the > + * local repository. > + */ > +int is_range_diff_range(const char *arg); If we were to use [v4 2/3], then we do parse it, even though we do use the parse result to reject some valid ranges (like "a history all the way down to root" in the implementation). I think just dropping everything after "Note that" is a sufficient fix.