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: Simon Josefsson
Subject: [Savannah-hackers-public] Re: prevent merge commits?
Date: Mon, 24 Aug 2009 23:19:08 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

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?

/Simon

address@hidden:~/src/gnutls master$ git diff master~1
diff --git a/libextra/gl/override/lib/md5.c.diff 
b/libextra/gl/override/lib/md5.c.diff
index e358243..327b50e 100644
--- a/libextra/gl/override/lib/md5.c.diff
+++ b/libextra/gl/override/lib/md5.c.diff
@@ -1,19 +1,19 @@
 --- gl/md5.c.orig      2009-08-20 15:33:39.000000000 +0200
 +++ gl/md5.c   2009-08-20 15:32:00.000000000 +0200
-@@ -129,2 +129,2 @@
+@@ -129,6 +129,8 @@
    return md5_read_ctx (ctx, resbuf);
  }
-
+ 
 +#if 0 /* Not needed by GnuTLS, and it has a large stack frame. */
 +
  /* Compute MD5 message digest for bytes read from STREAM.  The
     resulting message digest number will be written into the 16 bytes
     beginning at RESBLOCK.  */
-@@ -196,3 +194,4 @@
+@@ -196,6 +194,7 @@
    md5_finish_ctx (&ctx, resblock);
    return 0;
  }
 +#endif
-
+ 
  /* Compute MD5 message digest for LEN bytes beginning at BUFFER.  The
     result is always in little endian byte order, so that a byte-wise
address@hidden:~/src/gnutls master$ git push
Counting objects: 13, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (7/7), 842 bytes, done.
Total 7 (delta 3), reused 5 (delta 2)
libextra/gl/override/lib/md5.c.diff:6: trailing whitespace.
+ 
libextra/gl/override/lib/md5.c.diff:17: trailing whitespace.
+ 
error: hooks/update exited with error code 2
error: hook declined to update refs/heads/master
To address@hidden:/srv/git/gnutls.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'address@hidden:/srv/git/gnutls.git'
address@hidden:~/src/gnutls master$ cat .gitattributes 
libextra/gl/override/lib/md5.c.diff -whitespace
address@hidden:~/src/gnutls master$ 




reply via email to

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