Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Which, when you add a third variable "stuff", will require you to go back and add a space for both n and acc, pollutting both the diffs themselves (making reviews harder) and the git-blame (making pinpointing bugs harder).


    git diff -w


Yes, git diff -w is possible but it is not (unfortunately) the default (though I can see good reasons why it isn't).

Also, note that you can do the same in github:

Append ?w=1 to the url for the diff viewer and you'll get the whitespace ignored version.


Is there a git blame -w?


Yes.


There is a plugin in sublime text that I just select the lines and hit ctrl+shift+a and alignes everything in one hit.


That there is a plug-in that makes it easy does not make it right. If you're working just by yourself you can do whatever you want but teamwork takes a slightly different attitude when it comes to reformatting. It's all too easy to get into a whitespace war with someone else (and you'll both look so productive!). A good team member will change what is needed and will separate cosmetic changes and functional changes by placing them in different commits and will apply the style guide while doing so.

Tracking bugs through changesets is hard enough, no need to make it harder on purpose.


The way you realign your variables is inconsequential to the pain it causes your teammates (and potentially yourself) come time to look at the diff.

And yes, I know about git diff -w, but 1. not all tools built around git support it and 2. not everybody uses git.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: