Add button for explicit big file diff

Iulian Onofrei 8 years ago updated by Hyper Sonic 3 months ago 13

I have a big file which couldn't get diffed in the main window. So I increased the size limit in the preferences file, but now, every time I select it, the diff process starts automatically and hands the background thread of the app (the UI is not blocked though). Even if I just want to commit it.

For binary files, there is a button named "Force Text", which works similar to my idea, which sounds like this:

The user changed the diff limit size:

- Y:

- the user selects a file whose size is bigger than the default one:

- Y: a "Force Diff" button appears

- the user presses the button: the diff process starts

- N: the diff process starts

- N:

- the user selects a file whose size is bigger than the default one:

- Y: the "File is too large to display." message appears (optionally, with a button that (creates? and) opens the preference file, or better yet, move those configurations in the UI)

- N: the diff process starts

Let me know if I was clear enough!

Thank you,

Iulian Onofrei

Satisfaction mark by Iulian Onofrei 5 years ago

> "So I increased the size limit in the preferences file,"

How do you do that exactly?

Also, this should not be in the "Praises" section, since it's a feature request.

> How do you do that exactly?


> Also, this should not be in the "Praises" section, since it's a feature request.

Indeed, but for me (and probably others), it's very important to have it.

Hmm, that doesn't work for me.

However, if I edit smartgit.properties

and add


it seems to work

Sorry, indeed the `smartgit.properties` needs to be edited.

I'm so dumb 🤦🏻‍♂️ I thought that "praises" means something related to "pray" (🙏🏻), and that it was like a "pretty please implement this", than just "it would be nice to have this" (not a native English speaker).


Hm. To my understanding "praises" are not about new feature requests at all (regardless of which priority), but rather about praising us for the features which have already been implemented. Hence, unless I'm wrong, feel free to praise us as much as you like ;-)

I was thinking about this and the easiest solution would be to just add a Force diff button when the diff limit size is exceeded.

The reason for this is that I could reset the limit to the default value, so it doesn't hang or increase the CPU whenever I select one big file, but at the same time I do need the diff sometimes, in which case I could just hit the new Force diff button. And upon selecting another file and then the big file again, the diff won't show up until I click the button again.


That's how I implemented it now for the next 18.2 preview build.

It looks to me like it still computes the diff, and only after it finishes does it present the "File size exceeds ..." message. Because when I click the "Force Compare" button, it takes the same amount of time.

add following properties setting in smartgit.properties file:







Excellent, the Force Compare button was still annoying to press every time I was looking at big serialized text files (such as Godot engine .tscn). I wish there was a way to just tell SmartGit to force compare files ending with a certain extension.

Anyway, I added the lines to smartgit.properties, the critical one was the one with `smartgit.text.maxLineLength` in my case (for the quick diff preview at least). Not sure why it's called like that since the message near the Force Compare button mentions overall file size, rather than line length...

Where are those properties documented though? I couldn't find them online. Since there is no UI for them it would help users who need advanced tweaking; and ideally they should eventually get their own UI in Preferences, esp. the major ones like maxLineLength.

The UI and documentation is in the preferences, page Low-Level Properties.

Thanks, I see all overridden properties automatically appear there, for the rest I have to type part of the property name (except `smartgit.` to search and set them).

(screenshot after clicking to accept the risks)

Image 838