From: "Hannes Eder" <hannes.eder@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] allow a single form feed in pre commit hook
Date: Tue, 18 Dec 2007 11:09:20 +0100 [thread overview]
Message-ID: <5d2716640712180209k7e2fc9fdw74508178cb9fa54f@mail.gmail.com> (raw)
It's not uncommon to have a line with a single form feed in it, e.g.
the default GPL COPYING and also in .c files and others. Attached
patch allows this in the pre-commit hook.
-Hannes
diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit
index 7092bae..a759f92 100644
--- a/templates/hooks--pre-commit
+++ b/templates/hooks--pre-commit
@@ -55,7 +55,7 @@ perl -e '
if (s/^\+//) {
$lineno++;
chomp;
- if (/\s$/) {
+ if (!/^\f$/ && /\s$/) {
bad_line("trailing whitespace", $_);
}
if (/^\s* \t/) {
next reply other threads:[~2007-12-18 10:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 10:09 Hannes Eder [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-12-18 9:47 [PATCH] allow a single form feed in pre commit hook Hannes Eder
2007-12-18 10:18 ` Junio C Hamano
2007-12-18 10:27 ` Jakub Narebski
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=5d2716640712180209k7e2fc9fdw74508178cb9fa54f@mail.gmail.com \
--to=hannes.eder@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).