Re: [PATCH] allow a single form feed in pre commit hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> "Hannes Eder" <hannes.eder@xxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux