Differences View Line Numbers

In SourceTree Mac 1.6.0b1 (but also in 1.5.8)

On the Repository Window, File status File Status View, with a Git repository and staging enabled, the differences view (shows the contents of a selected file) displays mangled line numbers for some file types.

I first noticed this with a CSV file, but then observed it with a file with no extension (like README).

Here's a video that demonstrates the problem I'm seeing:

http://youtu.be/qWgUz89uHuY

And here's a screen shot:

Problem with Differences View line numbers

Seems most likely that this is user error of some sort, but I can't see how. Any ideas?

1 answer

1 accepted

Hi Chris,

This is an encoding issue which we've seen in the past due the diff view not seeing the line endings it's expecting. There's an open issue here which causes the problems you're showing. It's not really user error, it's just the SourceTree diff view doesn't know to handle the encoding. In fact, the diff is ripped out from what Git reports back, which in this case likely means the line endings are different from what's expected.

Keep an eye out on that issue we've linked, it's still an open ongoing issue that we plan to look at in more detail in the future. I'll put a vote on the issue on your behalf.

Cheers

Great explanation, thanks. I'll watch that bug and see if I can't work out the line endings on my end.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

561 views 1 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you