> emmapeel wrote (13 Mar 2016 09:27:31 GMT) :
>> Anybody has a nice git hook that will spank me if I try to commit with
>> trailing spaces?
> 
Maybe somebody finds this interesting:

So, looking around on tails repo .git/hooks (not sure if they are
created by my setup or by tails master) there was this
pre-commit.sample, and at the bottom there was this:


# If there are whitespace errors, print the offending file names and fail.
# exec git diff-index --check --cached $against --

So I created a file called pre-commit in tails/.git/hooks with only one
line:

exec git diff-index --check --cached $against --

And now git does not allow me to commit when there is a trailing space!



Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Tails-dev mailing list
[email protected]
https://mailman.boum.org/listinfo/tails-dev
To unsubscribe from this list, send an empty email to 
[email protected].

Reply via email to