delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/09/13:08:37

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Blake <ebb9 AT byu DOT net>
Subject: Re: git: Tralining whitespace error during commit
Date: Thu, 9 Aug 2007 17:07:51 +0000 (UTC)
Lines: 41
Message-ID: <loom.20070809T190201-223@post.gmane.org>
References: <70952A932255A2489522275A628B97C304EAD90B AT xmb-sjc-233 DOT amer DOT cisco DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Matt Seitz (matseitz <matseitz <at> cisco.com> writes:

> "To solve the problem, you need to edit .git/hooks/pre-commit and
> comment out the following lines:
> 
> if (/\s$/) {
> bad_line("trailing whitespace", $_);
> }"
> 
> Is this the best solution?

It's one approach.

Another is disabling the pre-commit hook in your repository altogether, by 
chmod a-x .git/hooks/pre-commit.

And yet another, which I have been considering doing the next time I package 
git (right now, I'm kind of waiting for git 1.5.3 to come out), is to override 
the upstream git's decision that on cygwin, the templates installed 
in /usr/share/git-core/templates are installed with executable permissions; 
whereas on Linux, they are installed without.  In other words, _somebody_ (not 
me) thought that because windows permissions can't be relied on, that ALL git 
hooks should be enabled by default; whereas on Linux, where permissions are 
reliable, ALL git hooks are disabled by default and you must chmod +x them to 
turn them on.  This seems inconsistent to me, but not to the point that I have 
complained upstream on the git mailing list; perhaps you'd like to raise the 
point there?

> 
> Attachment (cygcheck.out): application/octet-stream, 11 KiB
> 
> When I run "git commit" to check in changes to my

Attaching the contents of your email was rather redundant.  You may want to 
revisit how your mailer is set up.

-- 
Eric Blake
volunteer cygwin git maintainer




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019