Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Kate Kate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • UtilitiesUtilities
  • KateKate
  • Merge requests
  • !373

Adjust file history diff display

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark Nauwelaerts requested to merge mnauwelaerts/kate:history_diff into master Apr 25, 2021
  • Overview 3
  • Commits 2
  • Pipelines 0
  • Changes 2

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).

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: history_diff