Autor: emmapeel Datum: To: The Tails public development discussion list Betreff: Re: [Tails-dev] picky git hooks Was: meeting notes
> 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!