From ff2a44e9b68cfbc5f970bd07bad252607dd8179a Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Thu, 25 Sep 2008 01:33:24 +0200 Subject: [PATCH] tg mail -s SEND_EMAIL_ARGS: Pass arguments to git send-email --- README | 2 ++ tg-mail.sh | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README b/README index 7b117b8..03eeec5 100644 --- a/README +++ b/README @@ -296,6 +296,8 @@ tg mail Since it actually boils down to `git send-email` please refer to its documentation for details on how to setup email for git. + You can pass arbitrary options to this command through the + '-s' parameter, but you must double-quote everything. TODO: 'tg mail patchfile' to mail an already exported patch TODO: mailing patch series diff --git a/tg-mail.sh b/tg-mail.sh index 7e394b8..24e5f67 100644 --- a/tg-mail.sh +++ b/tg-mail.sh @@ -3,6 +3,7 @@ # GPLv2 name= +send_email_args= ## Parse options @@ -10,8 +11,10 @@ name= while [ -n "$1" ]; do arg="$1"; shift case "$arg" in + -s) + send_email_args="$1"; shift;; -*) - echo "Usage: tg [...] mail [NAME]" >&2 + echo "Usage: tg [...] mail [-s SEND_EMAIL_ARGS] [NAME]" >&2 exit 1;; *) [ -z "$name" ] || die "name already specified ($name)" @@ -45,6 +48,6 @@ people=() # NOTE: git-send-email handles cc itself -git send-email "${people[@]}" "$patchfile" +git send-email $send_email_args "${people[@]}" "$patchfile" rm "$patchfile" -- 2.11.4.GIT