Re: incorrect range-diff output?
- Date: Fri, 12 Apr 2019 10:41:49 +0200 (DST)
- From: Johannes Schindelin <Johannes.Schindelin@xxxxxx>
- Subject: Re: incorrect range-diff output?
On Thu, 11 Apr 2019, Thomas Gummerer wrote:
> 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 to advance the current branch.
> > - * linkgit:git-reset and linkgit:git-checkout (with
> > -+ * linkgit:git-reset and linkgit:git-restore (with
> > - pathname parameters) to undo changes.
> > +- pathname parameters) to undo changes.
> > ++ * linkgit:git-restore to undo changes.
> > * linkgit:git-merge 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 ;-)