Re: incorrect range-diff output?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 12, 2019, 08:41 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1904121038540.41@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190411220532.GG32487@hank.intra.tgummerer.com>
Hi Thomas,
On Thu, 11 Apr 2019, Thomas Gummerer wrote:
Show 28 quoted lines
> On 04/11, Duy Nguyen wrote: > > Try > > > > git range-diff from...to > > > > with those two branches from https://gitlab.com/pclouds/git.git. The > > interesting part is this > > > > diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt > > --- a/Documentation/gitcli.txt > > @@ -120,10 +111,11 @@ > > * linkgit:git-commit[1] to advance the current branch. > > > > - * linkgit:git-reset[1] and linkgit:git-checkout[1] (with > > -+ * linkgit:git-reset[1] and linkgit:git-restore[1] (with > > - pathname parameters) to undo changes. > > +- pathname parameters) to undo changes. > > ++ * linkgit:git-restore[1] to undo changes. > > > > * linkgit:git-merge[1] to merge between local branches. > > + > > > > This particular hunk comes from giteveryday.txt, not gitcli.txt. And > > the b/Documentation/gitcli.txt line is also missing. > > I think the output here is technically correct, even though it is very > misleading. range-diff doesn't currently show the filenames of the > diff that changed, which makes this a bit hard to read.
True. In the spirit of the "funcname" feature of our `git diff` command, we could add some (abbreviated) form of the corresponding `diff` lines (maybe just the `a/` filename? Or maybe the `a/` file name, prefixed by `-` or `+`, and if the `b/` filename is different, `old->new`? With `/dev/null` substituted by `(new)` or `(deleted)`?).
> [...] > > Maybe I can find some time over the weekend to tackle this, if nobody > else gets to it first.
Good luck ;-)
Ciao, Dscho