Re: [PATCH v4 05/21] range-diff: also show the diff between patches
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 10, 2018, 21:12 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1808102308140.71@tvgsbejvaqbjf.bet>
- In-Reply-To
- <CAPig+cSeAUWFCBEbk0m7_gmATAaVDg-fi42kq49DuGm3g0L4=Q@mail.gmail.com>
Hi Eric,
On Mon, 30 Jul 2018, Eric Sunshine wrote:
Show 23 quoted lines
> On Mon, Jul 30, 2018 at 5:26 PM Thomas Gummerer <t.gummerer@gmail.com> wrote: > > On 07/30, Johannes Schindelin wrote: > > > On Sun, 29 Jul 2018, Thomas Gummerer wrote: > > > > There's one more thing that I noticed here: > > > > > > > > git range-diff --no-patches > > > > fatal: single arg format requires a symmetric range > > > > > > > I immediately thought of testing for a leading `-` of the remaining > > > argument, but I could imagine that somebody enterprisey uses > > > > > > git range-diff -- -my-first-attempt...-my-second-attempt > > > > > > and I do not really want to complexify the code... Ideas? > > > > Good point. I can't really come up with a good option right now > > either. It's not too bad, as users just typed the command, so it > > should be easy enough to see from the previous line what went wrong. > > I think you can attain the desired behavior by making a final > parse_options() call with empty 'options' list after the call to > diff_setup_done(). It's pretty much a one-line fix, but can probably > be done as an incremental change rather than rerolling.
But then we would have to keep `--` in the first, and not in the second parse_options() call, right? We would also have to handle that `--` properly in the loop that calls diff_opt_parse(), I think.
A bit more involved than just a one-line fix, but I guess I'll give it a try.
Ciao, Dscho