4 ms·
The diff could be smarter and notice that you just inserted some white space. Many GUI apps actually do that but unfortunately not your typical diff or git whi
by 21 9y ago
The diff could be smarter and notice that you just inserted some white space.
Many GUI apps actually do that but unfortunately not your typical diff or git which insist in dealing with full lines only.
- harrisi 9y agoI'm sure many know, but for those who don't, `diff` (and `git diff`) accept -w and -b to ignore all white space and changes in the amount of white space, respectively. I find these very handy. Somewhat related, if you're looking at a diff on GitHub and want to ignore whitespace, you can just tack on `?w=1` to the URL (https://github.com/blog/967-github-secrets https://github.com/blog/967-github-secrets).
- ghusbands 9y agoThough you still end up committing whitespace changes that can then cause unexpected conflicts, later.
- mtm 9y agoFor github I crafted together this little bookmarklet to ignore whitespace on diffs (use it daily for our code reviews): javascript:(function()%7Bopen(location.href+'?w=1');%7D)();void(0);