Add an option to switch back to compare algorithm of version 17

Jason Chen 2 years ago updated 2 years ago 2

I notice that `Reworked Compare` is a new feature of version 18. It compares code block by block rather than line by line. It looks cleaner than version 17.

However, the granularity of difference is much coarser than version 17. It lose the flexibility of editing code.

For example, the following picture is screen shot of version 18. I can only `stage` lines 5 to 7 or `discard` them all together.

The following picture is screen shot of version 17. I can `discard` line 5 and 7 while `stage` line 6 individually just by three clicks. It is very convenient and flexible. I always think it is a best feature of `SmartGit` diff editor.

If I want to do the same thing in version 18 I must delete line 5 and 7 in my own editor and then `stage` line 6 in the `SmartGit`. It is very boring and inconvenient!

I think it is easy to add an option to switch compare algorithm back to version 17. For example, add  button at the up-right corner of the compare pane. The default compare algorithm is version 18. If the button is clicked the compare algorithm is switched back to version 17. 

You can use the following sample code to check the algorithm difference between version 18 and version 17:



Instead of "switching back" can SG devs improve the new one with this feature the prior had? I would like that more because I appreciate the improved diffs; I also miss the "stage lines" that worked better of the prior implementation.


@c600g I agree with you. Comparing block by block is friendly for reading, while comparing line by line is convenient for editing. These two comparing methods are both useful.

The expected implementation maybe like this:

Add a button to the upper-right corner of the compare pane. This button is responsible for switching between block-by-block and line-by-line comparing methods. The default comparing method is the block-by-block one. Click the button once, the comparing method is switched to line-by-line. Click the button again, the comparing method is switched back to block-by-block.