[PATCH] git-send-email: provide hook to send lines more than 998 symbols
- From
Andy Shevchenko <andy.shevchenko@gmail.com>
- Date
- Nov 21, 2008, 09:59 UTC
- Message-ID
- <1227261564-13268-1-git-send-email-andy.shevchenko@gmail.com>
By default git-send-email does not accept patch which is contain lines longer than 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one variable in shell script. So, define environment variable GIT_SEND_EMAIL_LONGLINE to something to avoid that restriction.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> --- git-send-email.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl index 94ca5c8..29f700d 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -981,7 +981,7 @@ sub validate_patch { open(my $fh, '<', $fn) or die "unable to open $fn: $!\n"; while (my $line = <$fh>) { - if (length($line) > 998) { + if (length($line) > 998 and not $ENV{GIT_SEND_EMAIL_LONGLINE}) { return "$.: patch contains a line longer than 998 characters"; } }
-- 1.6.0.2.GIT