chiark / gitweb /
tg mail -s SEND_EMAIL_ARGS: Pass arguments to git send-email
authorPetr Baudis <pasky@suse.cz>
Wed, 24 Sep 2008 23:33:24 +0000 (01:33 +0200)
committerPetr Baudis <pasky@suse.cz>
Wed, 24 Sep 2008 23:33:24 +0000 (01:33 +0200)
README
tg-mail.sh

diff --git a/README b/README
index 7b117b8..03eeec5 100644 (file)
--- 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
index 7e394b8..24e5f67 100644 (file)
@@ -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"