[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: overly zealous git hook
From: |
Bruno Haible |
Subject: |
Re: overly zealous git hook |
Date: |
Tue, 21 Jul 2009 10:20:44 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Jim,
> > FYI, this change in behavior is the result of savannah upgrading to
> > the latest version of git, whose git diff --check tests for that.
Thanks for the pointer. Indeed, the relevant git changes are:
http://git.kernel.org/?p=git/git.git;a=commitdiff;h=877f23ccb88227203f2576abdfb5d1c15925fcb3
http://git.kernel.org/?p=git/git.git;a=commitdiff;h=04c6e9e9ca34226db095bbaa1218030f99f0b7c6
> Yes. These should be: modules/**/* and **/ChangeLog*. I believe it
> can be done by adding to .gitattributes a line
> ChangeLog* whitespace=-????
> and to modules/.gitattributes a line
> * whitespace=-????
> where ???? is the whitespace rule that triggers the error.
I'm adding modules/.gitattributes as follows:
===============================================================================
# "git diff --check" should not reject modules files which end in a blank line.
* whitespace=-trail
===============================================================================
But "git push" is now still rejected:
modules/pipe-filter:34: ends with blank lines.
error: hooks/update exited with error code 2
error: hook declined to update refs/heads/master
To ssh://address@hidden/srv/git/gnulib
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://address@hidden/srv/git/gnulib'
Why does the "git diff --check" on the server side not take into account the
modules/.gitattributes?
Bruno