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

[PATCH RFC3 06/13] send-email: Handle "GIT:" rather than "GIT: " during --compose

From
Michael Witten <mfwitten@gmail.com>
Date
Apr 13, 2009, 18:23 UTC
Message-ID
<1239647037-15381-7-git-send-email-mfwitten@gmail.com>
In-Reply-To
<1239647037-15381-6-git-send-email-mfwitten@gmail.com>

This should make things a little more robust in terms of user input; before, even the program got it wrong by outputting a line with only "GIT:", which was left in place as a header, because there would be no following space character.

Signed-off-by: Michael Witten <mfwitten@gmail.com>
---
 git-send-email.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 5f01ad2..5bd818e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -534,7 +534,7 @@ if ($compose) {
 
 	print C <<EOT;
 From $tpl_sender # This line is ignored.
-GIT: Lines beginning in "GIT: " will be removed.
+GIT: Lines beginning in "GIT:" will be removed.
 GIT: Consider including an overall diffstat or table of contents
 GIT: for the patch you are writing.
 GIT:
@@ -567,7 +567,7 @@ EOT
 	my $in_body = 0;
 	my $summary_empty = 1;
 	while(<C>) {
-		next if m/^GIT: /;
+		next if m/^GIT:/;
 		if ($in_body) {
 			$summary_empty = 0 unless (/^\n$/);
 		} elsif (/^\n$/) {
-- 
1.6.2.2.479.g2aec
Previous: Michael WittenNext: Michael Witten
Message 7 of 39 in “I hope this will do it!”
  1. I hope this will do it!Michael Witten, Apr 13, 2009
  2. 01/13 Docs: send-email: Put options back into alphabetical orderMichael Witten, Apr 13, 2009
  3. 02/13 Docs: send-email: Refer to CONFIGURATION section for sendemail.multieditMichael Witten, Apr 13, 2009
  4. 03/13 Docs: send-email: Remove superfluous information in CONFIGURATIONMichael Witten, Apr 13, 2009
  5. 04/13 Docs: send-email: --smtp-server-port can take symbolic portsMichael Witten, Apr 13, 2009
  6. 05/13 send-email: Cleanup the usage text and docs a bitMichael Witten, Apr 13, 2009
  7. 06/13 send-email: Handle "GIT:" rather than "GIT: " during --composeMichael Witten, Apr 13, 2009
  8. 07/13 send-email: 'References:' should only reference what is sentMichael Witten, Apr 13, 2009
  9. 08/13 send-email: Remove superfluous `my $editor = ...'Michael Witten, Apr 13, 2009
  10. 09/13 send-email: Remove horrible mix of tabs and spacesMichael Witten, Apr 13, 2009
  11. 10/13 send-email: Add --sleep for email throttlingMichael Witten, Apr 13, 2009
  12. 11/13 send-email: Minor cleanup of $smtp_server usage and send_message()Michael Witten, Apr 13, 2009
  13. 12/13 send-email: --compose takes optional argument to existing fileMichael Witten, Apr 13, 2009
  14. 13/13 send-email: --compose always includes a 'GIT: ' prefixed list of patch subjectsMichael Witten, Apr 13, 2009
  15. Junio C HamanoApr 13, 2009
  16. Michael WittenApr 13, 2009
  17. Andreas EricssonApr 14, 2009
  18. Junio C HamanoApr 14, 2009
  19. Andreas EricssonApr 14, 2009
  20. Michael WittenApr 14, 2009
  21. Andreas EricssonApr 14, 2009
  22. Stephen BoydApr 13, 2009
  23. Michael WittenApr 14, 2009
  24. Michael WittenApr 14, 2009
  25. Björn SteinbrinkApr 14, 2009
  26. Junio C HamanoApr 14, 2009
  27. Junio C HamanoApr 13, 2009
  28. Michael WittenApr 13, 2009
  29. Junio C HamanoApr 14, 2009
  30. Michael WittenApr 14, 2009
  31. Junio C HamanoApr 14, 2009
  32. Michael WittenApr 14, 2009
  33. Junio C HamanoApr 13, 2009
  34. Michael WittenApr 13, 2009
  35. Michael WittenApr 13, 2009
  36. Junio C HamanoApr 14, 2009
  37. Michael WittenApr 14, 2009
  38. Junio C HamanoApr 14, 2009
  39. Michael WittenApr 14, 2009

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.