Re: [PATCH v4 05/21] range-diff: also show the diff between patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Eric,

On Mon, 30 Jul 2018, Eric Sunshine wrote:

> On Mon, Jul 30, 2018 at 5:26 PM Thomas Gummerer <t.gummerer@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux