Re: [PATCH v4 05/21] range-diff: also show the diff between patches
From: Johannes Schindelin <hidden>
Date: 2018-08-10 21:12:08
Hi Eric, On Mon, 30 Jul 2018, Eric Sunshine wrote:
On Mon, Jul 30, 2018 at 5:26 PM Thomas Gummerer [off-list ref] wrote:quoted
On 07/30, Johannes Schindelin wrote:quoted
On Sun, 29 Jul 2018, Thomas Gummerer wrote:quoted
There's one more thing that I noticed here: git range-diff --no-patches fatal: single arg format requires a symmetric rangeI 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