Re: [PATCH v4 1/3] range-diff/format-patch: refactor check for commit range
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 4, 2021, 19:27 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2102042026490.54@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqy2g364s9.fsf@gitster.c.googlers.com>
Hi Junio,
On Thu, 4 Feb 2021, Junio C Hamano wrote:
Show 23 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > 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.
Fair. I will add the sentence in 1/3 (because it is still correct there) and remove it as part of 2/3.
Ciao, Dscho