git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: git@vger.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH] git-send-email: provide hook to send lines more than 998 symbols
Date: Fri, 21 Nov 2008 11:59:24 +0200	[thread overview]
Message-ID: <1227261564-13268-1-git-send-email-andy.shevchenko@gmail.com> (raw)

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

             reply	other threads:[~2008-11-21 10:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21  9:59 Andy Shevchenko [this message]
2008-11-21 10:34 ` [PATCH] git-send-email: provide hook to send lines more than 998 symbols Arafangion
2008-11-21 10:37   ` Andy Shevchenko
2008-11-21 10:52     ` Teemu Likonen
2008-11-21 10:55       ` Andy Shevchenko
2008-11-21 11:09     ` Arafangion
2008-11-21 11:46       ` Andreas Ericsson
2008-11-21 12:04     ` Jeff King
2008-11-21 11:58 ` Jeff King
2008-11-21 12:49   ` Michael J Gruber
2008-11-21 13:29     ` Andy Shevchenko
2008-11-21 14:08     ` Jeff King

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=1227261564-13268-1-git-send-email-andy.shevchenko@gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).