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

Show trailing newline differences #353

Open
simon-abbott opened this issue Mar 22, 2023 · 4 comments
Open

Show trailing newline differences #353

simon-abbott opened this issue Mar 22, 2023 · 4 comments

Comments

@simon-abbott
Copy link

Feature Request

I was looking at the [0.71.4 -> 0.72.0-rc.0] upgrade guide and I noticed several changes (notably .watchmanconfig) that seem to be identical. I suspect that these changes are due to trailing newline changes, but the diff display doesn't show that. It would be nice if it showed both a) that there is a newline difference, and b) what that difference is (added, removed, etc).

Why it is needed

Not being able to easily tell exactly what changed makes using the helper a bit more cognitively difficult than it needs to be.

Possible implementation

Not sure, but I know it's possible since git diff does it.

Code sample

I don't know.

@cortinico
Copy link
Member

I would argue that whitespace differences should actually be hidden completely

@simon-abbott
Copy link
Author

Maybe have a toggle for it? I can see pros and cons to both. I personally like seeing the whitespace differences when upgrading so that our code is as similar to the "expected" code as possible, mostly so that future upgrades are easier since I can see clearly where things match up. However I can also totally see why some people wouldn't want to see them at all.

@cortinico
Copy link
Member

Maybe have a toggle for it?

This would probably be the best solution 👍 I guess we'll be more than happy to receive a contribution about this

@simon-abbott
Copy link
Author

Even with a toggle though I still think it should show newlines when whitespace mode is on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants