Skip to content

Adjust file history diff display

Mark Nauwelaerts requested to merge mnauwelaerts/kate:history_diff into master

At present, it uses git diff <blah> -- <file> which will display the diff from that commit to the working directory. Perhaps that is intentional, so then it's a feature ;-), but it is a more common expectation (upon such drill-down click) to see the changes in that commit of the history (otherwise it should somehow be more clearly specified that one is not actually looking at such). This patch makes it show the changes in the selected commit using git show, which results in a display similar to other tools. An alternative might be git diff blah^ blah -- <file>, but that has some tricky edge cases in case of merge commits or initial (root) commit.

While in that area, there is also a minor adjustment to make the diff display view/cursor start on top (rather than bottom).

Merge request reports