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

Re: [PATCH] send-email: new 'add-envelope' option

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 22, 2009, 17:54 UTC
Message-ID
<7v6392h2d9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<94a0d4530911220403w7238dab7saf18830a89f2add5@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
> Maybe I should wait until somebody adds the tests to --envelope-sender
> before pushing this patch.

You can say that if you want to be difficult to work with, or you can be that somebody yourself and make a difference.

Let me show you that we can be constructive for a change ;-)
How about something trivial like this?
-- >8 --
Subject: [PATCH] t9001: test --envelope-sender option of send-email
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t9001-send-email.sh |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 84a7f03..004e81c 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -95,6 +95,23 @@ test_expect_success \
     'Verify commandline' \
     'test_cmp expected commandline1'
 
+test_expect_success 'Send patches with --envelope-sender' '
+    clean_fake_sendmail &&
+     git send-email --envelope-sender="Patch Contributer <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
+'
+
+cat >expected <<\EOF
+!patch@example.com!
+!-i!
+!nobody@example.com!
+!author@example.com!
+!one@example.com!
+!two@example.com!
+EOF
+test_expect_success \
+    'Verify commandline' \
+    'test_cmp expected commandline1'
+
 cat >expected-show-all-headers <<\EOF
 0001-Second.patch
 (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'
Previous: Junio C HamanoNext: Felipe Contreras
Message 7 of 11 in “send-email: new 'add-envelope' option”
  1. send-email: new 'add-envelope' optionFelipe Contreras, Nov 21, 2009
  2. Jeff KingNov 21, 2009
  3. Felipe ContrerasNov 21, 2009
  4. Junio C HamanoNov 22, 2009
  5. Felipe ContrerasNov 22, 2009
  6. Junio C HamanoNov 22, 2009
  7. Junio C HamanoNov 22, 2009
  8. Felipe ContrerasNov 23, 2009
  9. Felipe ContrerasNov 22, 2009
  10. Junio C HamanoNov 22, 2009
  11. Felipe ContrerasNov 24, 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.