Re: [PATCH 2/3] send-email: validate patches before sending anything

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

 



On Fri, Jan 18, 2008 at 04:09:19PM +0100, Johannes Sixt wrote:

> Jeff King schrieb:
> > +sub validate_patch {
> > +	my $fn = shift;
> > +	open(my $fh, '<', $fn)
> > +		or die "unable to open $fn: $!\n";
> > +	while (my $line = <$fh>) {
> > +		if (length($line) > 998) {
> > +			return "patch contains line longer than 998 characters";
> 
> "... contains line_s_ longer than..."

I actually had that and changed it, since we know of only one such line
(since we bail at that point). I think Jay's suggestion of outputting
the line number is even better.

-Peff
-
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