Skip to content

Add move indicators to moved lines in diff view #2237

@Mingun

Description

@Mingun

TortoiseGitMerge have one killer feature that I never seen in other instruments -- it shows which lines was moved:

TortoseGitMerge moved line indicator

As I think, it uses the simple algorithm:

  1. collect all lines from each side in map<line content, count>
  2. go through all lines in a side
  3. if line exists in map of other side, draw move indicator and remove that line from the map (decrease counter if there several identical lines)
  4. do the same for other side

It would be great if SourceGit implement the same feature. It is very useful during reviews of refactoring commits, especially, when large amount of lines moved around. You may briefly check that nothing except move was done just by checking that all inserted and deleted lines have that indicator.

Note, that line content depends on the "Ignore whitespace" setting -- it contains line with stripped spaces for purposes of identity. That allows you to use this feature even when lines moved with indent changing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions