Skip to content

Conversation

mstv
Copy link
Member

@mstv mstv commented Aug 28, 2024

Proposed changes

  • Try to find multiple identical sections in removed/added line (instead of just at begin and end of line)
  • Draw anchor markers in order to indicate where a pure addition / removal is located

Screenshots

of ScriptOptionsProvider.cs of 25d4c13

Before

image

After

image

Test methodology

  • adapted tests
  • add tests
  • manual

Please do not squash merge


✒️ I contribute this code under The Developer Certificate of Origin.

@mstv mstv self-assigned this Aug 28, 2024
@mstv mstv marked this pull request as draft August 28, 2024 17:28
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit for this PR is fine for me.
The marker is not very visible, but good enough.

@RussKie
Copy link
Member

RussKie commented Aug 29, 2024

When user copies the text or a diff, would the markers be copied too? Would that have any effect on IDE or compiler?

@gerhardol
Copy link
Member

When user copies the text or a diff, would the markers be copied too? Would that have any effect on IDE or compiler?

No, GE only copies pure text (no formatting), this is not included

@mstv mstv force-pushed the feat/inline_diff branch from c40c403 to b3b7a1e Compare August 29, 2024 16:34
@mstv
Copy link
Member Author

mstv commented Aug 29, 2024

The matching algoritm is much better, but not perfect.
The diff looks strange for 226/227

image

TortoiseDiff handles that better

image

master is better in this situation (below is .17886, so the extra marker is there)

image

👍 I have restored that part of the previous algorithm.
(The algorithm will never be perfect because it does not consider the syntax of the language. But it should be good enough now.)

image

Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+2 to be approved when the dependency is approved.

mstv added a commit to mstv/gitextensions that referenced this pull request Aug 30, 2024
@mstv mstv force-pushed the feat/inline_diff branch from b3b7a1e to 2a6f3db Compare August 30, 2024 19:20
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A PR that reviews itself

mstv added a commit to mstv/gitextensions that referenced this pull request Sep 15, 2024
@mstv mstv requested review from pmiossec and RussKie September 21, 2024 21:01
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 22, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 26, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 26, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 27, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 27, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 27, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 27, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 27, 2024
mstv added a commit to mstv/gitextensions that referenced this pull request Sep 27, 2024
@mstv mstv marked this pull request as ready for review September 27, 2024 21:26
@gerhardol
Copy link
Member

+2 Has only reviewed briefly after latest changes, but have appreciated using this PR for a month now

@gerhardol
Copy link
Member

@gitextensions/git-extensions-team I suggest this PR is merged

@gerhardol
Copy link
Member

@mstv merge?

@mstv mstv force-pushed the feat/inline_diff branch from 44342c3 to 95a30af Compare October 14, 2024 18:22
@mstv mstv merged commit 95a30af into gitextensions:master Oct 14, 2024
4 checks passed
@mstv mstv deleted the feat/inline_diff branch October 14, 2024 19:06
@RussKie RussKie added this to the 5.1 milestone Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants