git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Next: Arafangion
Message 1 of 12 in “git-send-email: provide hook to send lines more than 998 symbols”
  1. git-send-email: provide hook to send lines more than 998 symbolsAndy Shevchenko, Nov 21, 2008
  2. ArafangionNov 21, 2008
  3. Andy ShevchenkoNov 21, 2008
  4. Teemu LikonenNov 21, 2008
  5. Andy ShevchenkoNov 21, 2008
  6. ArafangionNov 21, 2008
  7. Andreas EricssonNov 21, 2008
  8. Jeff KingNov 21, 2008
  9. Jeff KingNov 21, 2008
  10. Michael J GruberNov 21, 2008
  11. Andy ShevchenkoNov 21, 2008
  12. Jeff KingNov 21, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.