How can you combine git add patch -p mode with diff’s ignore-all-space

Here’s an adaptation from a related question. git diff -w –no-color | git apply –cached –ignore-whitespace It has the benefit that you don’t need to use stash, temporary files, or perform a reset –hard on your working folders. Addendum The solution above only stages changes except whitespace-only edits. This did not address patch, though using …

Read more

Trim trailing spaces with PostgreSQL

There are many different invisible characters. Many of them have the property WSpace=Y (“whitespace”) in Unicode. But some special characters are not considered “whitespace” and still have no visible representation. The excellent Wikipedia articles about space (punctuation) and whitespace characters should give you an idea. <rant>Unicode sucks in this regard: introducing lots of exotic characters …

Read more