Thread (25 messages) 25 messages, 5 authors, 2019-04-24

Re: incorrect range-diff output?

From: Thomas Gummerer <hidden>
Date: 2019-04-14 21:12:20

On 04/12, Johannes Schindelin wrote:
Hi Thomas,

On Thu, 11 Apr 2019, Thomas Gummerer wrote:
quoted
On 04/11, Duy Nguyen wrote:
quoted
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)`?).
Yeah something like this is what I ended up doing.  Except I was a bit
more verbose, so the filename would be prefixed with "modified file",
"new file", "deleted file" or "renamed file".  Since this doesn't need
to be machine readable in any way, I felt like that might be easiest
to consume for humans. 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help