chiark / gitweb /
provide a global temporary directory
[topgit.git] / tg-mail.sh
index 6a008b48a0a05fc59eff40f42f9ee1fd02897aeb..dd4a95a74ad9e47ed39dbff05f5f5d53993981e7 100644 (file)
@@ -30,11 +30,11 @@ 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"
+       send_email_args="$send_email_args --in-reply-to='$in_reply_to'"
 fi
 
 
-patchfile="$(mktemp -t tg-mail.XXXXXX)"
+patchfile="$(get_temp tg-mail)"
 
 $tg patch "$name" >"$patchfile"
 
@@ -54,6 +54,4 @@ people=
 # NOTE: git-send-email handles cc itself
 eval git send-email $send_email_args "$people" "$patchfile"
 
-rm "$patchfile"
-
 # vim:noet