chiark / gitweb /
tg mail -r MSGID: Generate In-reply-to header
authorPetr Baudis <pasky@suse.cz>
Fri, 3 Oct 2008 15:22:56 +0000 (17:22 +0200)
committerPetr Baudis <pasky@suse.cz>
Fri, 3 Oct 2008 15:22:56 +0000 (17:22 +0200)
README
tg-mail.sh

diff --git a/README b/README
index 35a9f98b773686e9a9b1301ad61edb9b0c122ca9..2c94dc6bd57eb80098250157598d5f06a356d164 100644 (file)
--- a/README
+++ b/README
@@ -298,6 +298,8 @@ tg mail
        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.
+       The '-r' parameter with msgid can be used to generate in-reply-to
+       and reference headers to an earlier mail.
 
        TODO: 'tg mail patchfile' to mail an already exported patch
        TODO: mailing patch series
index fb686e945a457e08ed00e16a78f40792a2a99443..dd50004a96127f9b6a26a93d1c47503c8aa1882d 100644 (file)
@@ -4,6 +4,7 @@
 
 name=
 send_email_args=
+in_reply_to=
 
 
 ## Parse options
@@ -13,8 +14,10 @@ while [ -n "$1" ]; do
        case "$arg" in
        -s)
                send_email_args="$1"; shift;;
+       -r)
+               in_reply_to="$1"; shift;;
        -*)
-               echo "Usage: tg [...] mail [-s SEND_EMAIL_ARGS] [NAME]" >&2
+               echo "Usage: tg [...] mail [-s SEND_EMAIL_ARGS] [-r REFERENCE_MSGID] [NAME]" >&2
                exit 1;;
        *)
                [ -z "$name" ] || die "name already specified ($name)"
@@ -26,6 +29,10 @@ done
 base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
        die "not a TopGit-controlled branch"
 
+if [ -n "$in_reply_to" ]; then
+       send_email_args="$send_email_args --in-reply-to=$in_reply_to"
+fi
+
 
 patchfile="$(mktemp -t tg-mail.XXXXXX)"