Re: [PATCH 2/3] send-email: validate patches before sending anything
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Jan 18, 2008, 15:09 UTC
- Message-ID
- <4790C11F.8010809@viscovery.net>
- In-Reply-To
- <20080118141948.GB19783@coredump.intra.peff.net>
Jeff King schrieb:
Show 7 quoted lines
> +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..."
-- Hannes