Missed Team ’24? Catch up on announcements here.

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

Sourcetree diff not working; displaying wrong add/substract and wrong linenumbers

Andre_Mandler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 22, 2018

I overwrote a .tex file with another version of it. The version on disk is now exactly as i want it. Sourcetree is showing the file as altered, but not all alterations are shown, and some nonexistent alterations are shown. Additionally the line-numbering is off.

See attached Screenshot: (yellow highlighted regions)

I opened the file in Notepad++ to show the real content, and you can see in the background the Sourcetree diff, with wrong line numbering (observe that the real /begin->/end block is four lines from 40 to 43 and the Sourcetree diff is a weird /begin->/end/end block) and, very importantly: A line that does not exist anymore (Sourcetree line 36) is not marked as missing!

I tried commiting, the commit works with the real file, and also reverts fine, but the shown diff is always wrong. Altering stuff in N++ and saving resulted in a still wrong diff, that some times showed a +/- of lines that were unaltered and mostly showed the altered line (i experimented with the Windows 8 line ) as unaltered.

A diff using the diff tool from TortoiseGit was normal and correct.

Just to be clear: I doublechecked that N++ and Sourcetree are seeing the same file, by altering it in N++ and seeing the file change in Sourcetree - so this is not about looking at different files, this is some bug(?) in the ST-Diff (not the actual storing of files, just the showing of the differences)

Anybody know what causes this? It is very disconcerting to not be able to trust the diff.Sourcetree-Problem.png

Screenshot from Bitbucket, of older version of the file, with "Windows 8" line as part (?) of Line 33 ??

BitBucket old source of system_requirements.tex.png

 

1 answer

1 accepted

0 votes
Answer accepted
bgannin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2018

Hi Andre,

This is an excellent bug report. Please file these details in our public tracker, https://jira.atlassian.com/browse/SRCTREEWIN, and we'll take it from there.

Thanks,

Brian Ganninger
Product Manager, Sourcetree

Andre_Mandler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2018

There seems to be an issue with CR as sole newline character, that (seemingly) won't get fixed: https://confluence.atlassian.com/sourcetreekb/diffs-do-not-render-correctly-due-to-an-old-style-mac-line-endings-265902596.html

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events