On Tue, Mar 26, 2013 at 12:47 PM, Daniel Shahaf <d...@daniel.shahaf.name> wrote: > We've noted on IRC that this might fail if /foo and /foo\n get modified > in the same revision.
Actually at least with FSFS the commit will fail in that case because FSFS will believe you tried to add the same file twice. However, this pre-commit script (which requires the Python bindings) should catch all the variations. It also checks for other control characters, but you can easily change that by changing the control_chars set at the top of the file.
control-chars.py
Description: Binary data