Binary file detection different from command-line git?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Binary file detection different from command-line git?

SmartGit mailing list
Hi there,

as it seems, the heuristic detection of binary files in SmartGit is
different from the command line git command.

I have an UTF-8 encoded XML file with 8000+ lines where one specific
line somewhere in the middle is 27000+ characters long. Most other lines
are regular length.

At the command line, I can properly diff the file and get useful
results. In SmartGIT, the file is displayed as "Binary content" and
diffing is impossible, even if the changes are perfectly normal far away
from the long line.

Is there a way to work around this?

Greetings,
Norbert


--
Dr. Norbert Nemec
Teamleader Software Development
+49-30-611035-1882
Native Instruments GmbH
http://www.native-instruments.com
Reply | Threaded
Open this post in threaded view
|

Re: Binary file detection different from command-line git?

WORMSS
I have been stung out by this in the pas.

The reason the file is just refused to be 'diffed' is for performance reasons. The pretty GUI look of the diff would/could take a while.

I have suggested a button that would disable which ever check decides not a suitable file to diff. You could even have a warning that the performance will take a while.

This button would obviously have to be clicked each time, but that is then the user accepting the fact that it will take a while.

The other option I thought of but cannot remember if I suggested it or not, is to display the diff as normal, but have a little warning icon next to which ever line/lines are too long to diff. Little /!\ icon is all you need with a little hint box when mouse over maybe?.
This would let the user still Visually/manually look through the rest of the file as normal, and they could even manually check that giant line if they liked.

- Colin.
Reply | Threaded
Open this post in threaded view
|

Re: Binary file detection different from command-line git?

SmartGit mailing list
In reply to this post by SmartGit mailing list
Hi Norbert,

Please add the line

smartgit.compare.text.maxLineLength=30000

to smartgit.properties. That will increase the accepted limit from 10.000 to 30.000.

--
Best regards,
Thomas Singer
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com


09/11/2014 09:20 - Norbert Nemec [hidden email] [smartgit] wrote:

> Hi there,
>
> as it seems, the heuristic detection of binary files in SmartGit is
> different from the command line git command.
>
> I have an UTF-8 encoded XML file with 8000+ lines where one specific
> line somewhere in the middle is 27000+ characters long. Most other lines
> are regular length.
>
> At the command line, I can properly diff the file and get useful
> results. In SmartGIT, the file is displayed as "Binary content" and
> diffing is impossible, even if the changes are perfectly normal far away
> from the long line.
>
> Is there a way to work around this?
>
> Greetings,
> Norbert
>
>
> --
> Dr. Norbert Nemec
> Teamleader Software Development
> +49-30-611035-1882
> Native Instruments GmbH
> http://www.native-instruments.com
>