Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Diff Doesn't Show Changes in New Line Characters #19254

Open
skl131313 opened this issue Jan 24, 2017 · 10 comments
Open

Git Diff Doesn't Show Changes in New Line Characters #19254

skl131313 opened this issue Jan 24, 2017 · 10 comments
Assignees
Labels
diff-editor Diff editor issues feature-request Request for new features or functionality
Milestone

Comments

@skl131313
Copy link
Contributor

The diffeditor doesn't show new line ending changes (eg CRLF vs LF) even with "diffEditor.ignoreTrimWhitespace" set to false.

@mousetraps mousetraps added bug Issue identified by VS Code Team member as probable bug diff-editor Diff editor issues editor labels Jan 24, 2017
@alexdima alexdima added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Jan 25, 2017
@alexdima
Copy link
Member

It was never implemented, thus marking as feature request

@alexdima alexdima removed their assignment Jan 25, 2017
@alexdima alexdima added this to the Backlog milestone Jan 25, 2017
@alexdima alexdima removed the editor label Nov 23, 2017
@SailorMax
Copy link

If .git/config has "autocrlf = false" and try to commit file with other new line symbol, VSCode diff viewer show that file was changed but no changes in the file. In same time git diff show that changed all file.
Why this is not a bug?
How user can detect wrong new line symbol in the file?

@DonPavlov
Copy link

It would be nice to easily change the eol in the git diff view via selecting it in the button on the bottom.

@mhanuszh
Copy link

mhanuszh commented Mar 7, 2021

It looks like this feature is not a high priority, and that's understandable, but at least the diff viewer could show a warning, like Meld does:
image

@HarveyKBrown
Copy link

See my issue mentioning this. The Stage Selected ranged option changes line endings which without diff showing line-ending changes makes it a hard issue to spot ahead of realising gitblame is saying you edited every single line in a file you barely edited.

@HarveyKBrown
Copy link

I also reccomend using "Render Line Ending" extension to better see when this issue happens, but it still wont make it register as a change in the diff.

@ToBoMi
Copy link

ToBoMi commented Nov 24, 2023

In #5118 (comment) it was suggested to merge that issue #5118 with this issue.

Let's continue tracking in #19254 because that one has more upvotes.

Current title of that issue is: "Diff editor: Show encoding and eol differences"

This issue is not about showing encoding changes in the diff editor. The other issue is.

Please change this issue title that it includes encoding changes.
If it stays like it is currently, the merge of the two issues lost one feature request (The "show also encoding changes" feature request).

I can understand if the original author of this issue does not want to change it. Then in future it would be good to ask for change before merging issue with different contents.

Original issue is locked - I cannot put this statement there. Creating a new issue would be an option. I'll do that if this issue is not changed.

@queglay
Copy link

queglay commented Dec 12, 2023

We have repos with mixed line endings and not being able to see when I'm about to break a file with line endings changing isn't possible in vscode. I have to use git diff in command line. It would be very helpful to see a solution to this.

@ToBoMi
Copy link

ToBoMi commented Dec 12, 2023

@skl131313 can you change the title in a way that it includes encoding differences?

@hediet hediet self-assigned this Dec 12, 2023
@queglay
Copy link

queglay commented Apr 23, 2024

Just an update since some time has passed without a fix. others in my company that use pycharm dont have this problem - its pretty hard for me to sell others on vscode when I keep accidentally committing changes that overwrite the entire git blame for a file - because the viewer suppresses the actual delta for all the changes in line endings. I'd really like to see a fix for this point of embarrassment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diff-editor Diff editor issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests