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

Skip whitespace changes #100

Open
robertoaloi opened this issue Oct 23, 2024 · 4 comments
Open

Skip whitespace changes #100

robertoaloi opened this issue Oct 23, 2024 · 4 comments

Comments

@robertoaloi
Copy link

Hi! Not sure if this is somehow available already, but it would be great to have the option not to display whitespace changes when comparing two versions:

https://diff.hex.pm/diff/redbug/2.0.9..2.1.0

@wojtekmach
Copy link
Member

Thank you for the report. We don't have that yet but I think it'd be a nice addition. PRs welcome!

@ericmj
Copy link
Member

ericmj commented Nov 13, 2024

What kind of whitespace changes do you want to ignore? We use git diff to build the diff, what flags would we pass to it get the expected result?

As a note GitHub also shows whitespace changes and I can't find an option to ignore it: massemanet/redbug@2.0.7...2.0.10

@robertoaloi
Copy link
Author

Hi @ericmj,

-w is the git diff option you want. The option is available via the w=1 query param on GitHub. So, for example, for the redbug_eunit:t_8_test/1 function:

massemanet/redbug@2.0.7...2.0.10

Screenshot 2024-11-18 at 09 29 30

https://github.com/massemanet/redbug/compare/2.0.7...2.0.10?w=1

Screenshot 2024-11-18 at 09 29 49

Not sure why the option is not available via the GitHub UI.

@ericmj
Copy link
Member

ericmj commented Nov 25, 2024

Thanks for the explanation, an option to skip whitespace in diffs definitely seems reasonable to support.

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

3 participants