Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SourceTree incorrectly shows a large text file as binary, doesn't do diff

upr_avaleo July 20, 2017

I have a large XML file stored in Git (GitHub) repo.

[user@host tools]$ ls -lh somefile.xml
-rw-r--r-- 1 user users 1.6M Jul 19 17:25 somefile.xml
[user@host tools]$ file somefile.xml
somefile.xml: XML document, UTF-8 Unicode text, with very long lines

By default SourceTree for Windows is not showing diff for this file in any commit.

It shows a message "No changes in this file have been detected, or it is a binary file".

But when I go to Options / Diff and change Size Limit (Text) from the default 1024KB to something larger than the above file size (ie. 10240KB) then it shows the diff correctly.

The default error message shown for this file is misleading, because it not a binary nor an unchanged file. SourceTree should warn that this file is too large to show a diff using current settings. Also it should correctly detect UTF-8 files, if it makes any problems for Git.

I'm using SourceTree 2.1.2.5 on Windows 7, with NTFS filesystem.

2 answers

1 vote
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2017

Hi Przemyslaw, I've created a Feature request on your behalf to improve the messaging shown in this case, you can find it at SRCTREEWIN-7627.

For the future, you're welcome to submit your own suggestions at jira.atlassian.com by clicking on the Create button

Hope this helps!

Ana

Sateesh Bandi October 2, 2017

is this fixed? Because, after I take an update ..i still see this issue... if not is there any timeline.

Helge Klein November 7, 2018

This does not seem to be fixed in Sourcetree 3.0.8. I am getting the message for a 1 MB JSON file:

No changes in this file have been detected, or it is a binary file.

Helge Klein November 7, 2018

OK, figured out that this can be fixed by increasing the size limit in the Diff tab of the options.

Like # people like this
gregpugh January 27, 2021

Increasing the size allowed for a Diff was the exact solution I was looking for. I was wondering why Git Diff would work but SourceTree Diff kept treating the file as binary!

Jeramie June 15, 2023

Thank you, changing the DIFF size fixed it for me too.  Now I can see DELTAS for large XML files!

0 votes
Helge Klein November 7, 2018

This does not seem to be fixed in Sourcetree 3.0.8. I am getting the message for a 1 MB JSON file:

No changes in this file have been detected, or it is a binary file.

Helge Klein November 7, 2018

I re-posted this as a reply to Ana's answer. Deleting this answer does not seem to be possible for me.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events