Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • meld meld
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 198
    • Issues 198
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • meldmeld
  • Issues
  • #123
Closed
Open
Issue created Jan 13, 2017 by Bugzilla@bugzilla-migration💬Reporter

[BZ#777231] Add "Per-Hunk Ignore Whitespace" like xxdiff

Submitted by Scott Langley

Link to original bug (#777231)

Description

Could you add this feature like xxdiff has?

http://furius.ca/xxdiff/doc/xxdiff-secrets.html

Per-Hunk Ignore Whitespace

Often in a context of looking at many changes, code reviewers get really annoyed with having to review formatting changes intermixed with code changes. Fortunately, some of these changes can be ignored by diff by ignoring the whitespace characters (and this is also supported by xxdiff) but this does not help for the cases when reformatting involves breaking lines.

In practice, if you're just re-formatting some code, it is often the case that only whitespace differences are appearing in a diff hunk. For this purpose, xxdiff has a special feature that de-emphasizes diff hunks that only differ in whitespace. perhunk.png

The algorithm we use is really simple: given a diff hunk with text on both sides (i.e. a change hunk), we compare all the non-whitespace characters. If the entire hunks do not differ in that way, we de-emphasize the hunk to make it look like both regions are the same (using a gray color similar to the color for non-differing hunks). Those hunks are otherwise still selectable for merging.

Assignee
Assign to
Time tracking