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

Stash - unable to view diff in PR

Vinodhini Asok Kumar
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!
June 27, 2019

I have created a PR in Stash. I have made to changes to an existing file in the repository and I am want to view the changes in a file after creating a PR.

Stash shows the diff as if I have removed all the contents of the file and added it newly, while I have added only few lines of code in the existing file.

But when I select “Ignore whitespace” from the menu, I am able to view the changes I made.

Since the code is owned by the organization I will not be able to post the screenshot of it.
Has anyone faced this issue. I would really appreciate if anyone could help me fix it. Thanks for your help in advance.

1 answer

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 27, 2019

Hi @Vinodhini Asok Kumar,

Welcome to the Atlassian Community.

What you see is very common with diff tools, I have seen this multiple times before. It is usually caused by the editor and the type of line endings that it adds. The only way around it is to use the ignore white space and you could also create a post hook that runs a script that converts all line endings to either Windows style or Unix style. Git also allows you to set what style should be used when a file is committed, check out Git Configuration and the Formatting and Whitespace section.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events