git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Thomas GummererNext: Thomas Gummerer
Message 3 of 29 in “incorrect range-diff output?”
  1. Duy NguyenApr 11, 2019
  2. Thomas GummererApr 11, 2019
  3. Johannes SchindelinApr 12, 2019
  4. Thomas GummererApr 14, 2019
  5. Duy NguyenApr 12, 2019
  6. Junio C HamanoApr 12, 2019
  7. Thomas GummererApr 14, 2019
  8. Junio C HamanoApr 15, 2019
  9. Johannes SchindelinApr 15, 2019
  10. 0/4 output improvements for git range-diffThomas Gummerer, Apr 14, 2019
  11. 1/4 range-diff: fix function parameter indentationThomas Gummerer, Apr 14, 2019
  12. 2/4 range-diff: don't remove funcname from inner diffThomas Gummerer, Apr 14, 2019
  13. Eric SunshineApr 14, 2019
  14. Johannes SchindelinApr 15, 2019
  15. Thomas GummererApr 15, 2019
  16. Johannes SchindelinApr 17, 2019
  17. Thomas GummererApr 24, 2019
  18. Johannes SchindelinApr 15, 2019
  19. Thomas GummererApr 15, 2019
  20. 3/4 range-diff: add section header instead of diff headerThomas Gummerer, Apr 14, 2019
  21. Eric SunshineApr 14, 2019
  22. Johannes SixtApr 15, 2019
  23. Johannes SchindelinApr 15, 2019
  24. Thomas GummererApr 15, 2019
  25. 4/4 range-diff: add section headers to the outer hunk headerThomas Gummerer, Apr 14, 2019
  26. Johannes SchindelinApr 15, 2019
  27. Thomas GummererApr 15, 2019
  28. Johannes SchindelinApr 15, 2019
  29. Thomas GummererApr 15, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.