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

Create different changetype for whitespace diffs #7

Merged
merged 2 commits into from
Oct 19, 2015

Conversation

navarr
Copy link
Contributor

@navarr navarr commented Jun 4, 2015

This removes spam from whitespace changes between the fresh copy and the existing copy.

Example:

So much nicer than having 13724 "diferentFileContent" with blank diffs.

@steverobbins
Copy link

👍

@beejhuff
Copy link

beejhuff commented Jun 5, 2015

Navarr, I'm a bit new to this utility but have recently came across this same issue you're addressing. Thanks for submitting this!

Am I correct that the core of your update here is that you're taking the output of file_get_contents and then replacing whitepsaces, tabs, new lines and carriage returns in that output so that they are normalized before passed to the subsequent shellexec call to diff in getFileDiff() ?

@navarr
Copy link
Contributor Author

navarr commented Jun 5, 2015

This actually isn't touched by getFileDiff. For the part of the program
that determines whether or not the files have any differences a simple
string comparison is done.

Instead of normalizing I completely remove all whitespace. Which could
theoretically not show certain diffs in strings that are whitespace
related.

On Fri, Jun 5, 2015, 12:42 Bryan Hoffpauir (BJ Hoffpauir) - Chief
Technology Officer notifications@github.com wrote:

Navarr, I'm a bit new to this utility but have recently came across this
same issue you're addressing. Thanks for submitting this!

Am I correct that the core of your update here is that you're taking the
output of file_get_contents and then replacing whitepsaces, tabs, new lines
and carriage returns in that output so that they are normalized before
passed to the subsequent shellexec call to diff in getFileDiff() ?


Reply to this email directly or view it on GitHub
#7 (comment).

@navarr
Copy link
Contributor Author

navarr commented Jun 11, 2015

@fbrnc I've updated the PR with the better whitespace normalization we discussed (and fixed a bug I accidentally introduced when I tried to pretty up the commit history for this PR - whoops!)

@navarr
Copy link
Contributor Author

navarr commented Oct 19, 2015

@fbrnc Anything else missing from this? It's been a few months 😛

fbrnc added a commit that referenced this pull request Oct 19, 2015
Create different changetype for whitespace diffs
@fbrnc fbrnc merged commit c025188 into AOEpeople:master Oct 19, 2015
@fbrnc
Copy link
Member

fbrnc commented Oct 19, 2015

Sorry for the delay. Just merged your code. Thank you!

@navarr navarr deleted the detect-whitespace-changes branch November 17, 2015 15:13
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

Successfully merging this pull request may close these issues.

4 participants