git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neal Kreitzinger <nkreitzinger@gmail.com>
To: git@vger.kernel.org
Subject: Re: pre-commit hook to reject whitespace
Date: Fri, 03 Jun 2011 18:58:31 -0500	[thread overview]
Message-ID: <isbsf8$6id$1@dough.gmane.org> (raw)
In-Reply-To: <isbqsf$vh8$1@dough.gmane.org>

On 6/3/2011 6:31 PM, Neal Kreitzinger wrote:
> The reference manuals state in the hooks documentation that the pre-commit
> hook sample will reject whitespace only changes.  However, the
> pre-commit.sample in the 1.7.1 and 1.7.5.4 downloads do not appear to do
> this (I'm new to linux scripts).  The appear to only reject non-ascii
> filenames.  Does someone have a pre-commit hook example I can use to reject
> whitespace-only changes?  Thanks!
>
As someone kindly pointed out, the documentation actually says:
"The default 'pre-commit' hook, when enabled, catches introduction of 
lines with trailing whitespaces and aborts the commit when such a line 
is found."

I'm not seeing this functionality in the pre-commit.sample for 1.7.1 or 
1.7.5.4.

v/r,
neal

  reply	other threads:[~2011-06-03 23:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 23:31 pre-commit hook to reject whitespace Neal Kreitzinger
2011-06-03 23:58 ` Neal Kreitzinger [this message]
2011-06-04  0:12   ` John Szakmeister
2011-06-04  0:23     ` Neal Kreitzinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='isbsf8$6id$1@dough.gmane.org' \
    --to=nkreitzinger@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).