Using sed to fix whitespace in a git pre-commit hook, I ran into problems with the line:
`sed -i '' [the regex] [the file]`

Similar [comments by others](https://gist.github.com/larsxschneider/3957621) mention this inconsistency, and that taking out the quotes fixes the problem. That confuses me because I thought sed -i should take a filename as the parameter immediately following the flag. It may be a shell inconsistency; the gist I linked to is a .sh script and I'm using bash/centos.

What is the magic/issue behind the `sed -i ''` usage, and how does stripping out the `''` correct the problem?