All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Hannes Eder" <hannes.eder@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] allow a single form feed in pre commit hook
Date: Tue, 18 Dec 2007 02:27:52 -0800 (PST)	[thread overview]
Message-ID: <m3prx4paam.fsf@roke.D-201> (raw)
In-Reply-To: <7v4peg1f33.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> "Hannes Eder" <hannes.eder@gmail.com> writes:
> 
> > It's not uncommon to have a lines 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.
> 
> Hmm.  The current trend is to get rid of the whitespace checks from this
> hook and enrich git-diff --check and git-apply --whitespace=error.
> 
> I've been planning to add a new whitespace error rule that allows ^M at
> the end of line, post 1.5.4.  Another rule that allows a lone ^L would
> match what you are doing here, and it would be a good addition as well.
 
There probably should also be 'trailing-empty-lines' rule; also
'eol-at-eof' could be useful as well (ensuring that final line ends
with newline character).

By the way, the check in pre-commit hook also checks for merge
conflict markers.  Those are not whitespace errors, but are quite
similar.  It would be nice to have this also .gitattributes
controlled, to avoid false positoves for changes in
Documentation/*.txt; althought perhaps more strict checking would be
enough...

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2007-12-18 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-12-18 10:09 Hannes Eder

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=m3prx4paam.fsf@roke.D-201 \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hannes.eder@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.