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
name=
send_email_args=
+in_reply_to=
## Parse options
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)"
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)"