savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] Re: prevent merge commits?


From: Jim Meyering
Subject: [Savannah-hackers-public] Re: prevent merge commits?
Date: Wed, 26 Aug 2009 15:49:54 +0200

Simon Josefsson wrote:

> Jim Meyering <address@hidden> writes:
>
>> Simon Josefsson wrote:
>>> Jim Meyering <address@hidden> writes:
>>>
>>>> FYI, it prohibits pushing trailing blanks as well, via this setting:
>>>>
>>>>   # hooks.allowbadwhitespace
>>>>   #   This boolean sets whether you may push a commit that adds bad 
>>>> whitespace.
>>>>   #   By default, you may not.
>>>>
>>>> Let me know if you'd prefer to toggle that for any of them.
>>>
>>> I ran into this check for an auto-generated file, which broke my release
>>> scripts...  For me it isn't worth preventing commits for whitespace
>>> reasons (I notice bad whitespace with 'make syntax-check' and fix when I
>>> have time), so please disable this check for all of my projects (gnutls,
>>> libtasn1, libidn, gsasl, shishi, gss, libntlm, autobuild, git2cl).
>>
>> You can do it, yourself -- on a per-file basis.
>> Just add a line like this in .gitattributes:
>>
>> generated.c -whitespace
>
> I can't get this to work, see output below.  Any ideas?

Hi Simon,

Sorry about that.  I was mistaken.
The .gitattributes file controls how your local commands like git commit
and git diff --check work.  When you're pushing, the server-side git
doesn't honor .gitattributes (it typically doesn't have a checked-out
directory), so the only file that can influence this process is
$GIT_DIR/info/attributes.

So if Savane were to provide a way to update that server-side file,
you'd be all set.  Just copy what you're using in .gitattributes
into $GIT_DIR/info/attributes.

In the mean time, I've turned off the badwhitespace part of
your commit hooks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]