chiark
/
gitweb
/
~ian
/
topgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
provide a global temporary directory
[topgit.git]
/
tg-mail.sh
diff --git
a/tg-mail.sh
b/tg-mail.sh
index 8d3b6320a11dfb945f2a70821ae7063a431dffff..dd4a95a74ad9e47ed39dbff05f5f5d53993981e7 100644
(file)
--- a/
tg-mail.sh
+++ b/
tg-mail.sh
@@
-29,20
+29,16
@@
done
base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
die "not a TopGit-controlled branch"
base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
die "not a TopGit-controlled branch"
-if ! git send-emmail --help >/dev/null 2>&1; then
- die "git send-email command not available"
-fi
-
if [ -n "$in_reply_to" ]; then
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
fi
-patchfile="$(
mktemp -t tg-mail.XXXXXX
)"
+patchfile="$(
get_temp tg-mail
)"
$tg patch "$name" >"$patchfile"
$tg patch "$name" >"$patchfile"
-header="$(sed -e '/^$/,$d' "$patchfile")"
+header="$(sed -e '/^$/,$d'
-e "s,','\\\\'',g"
"$patchfile")"
@@
-58,6
+54,4
@@
people=
# NOTE: git-send-email handles cc itself
eval git send-email $send_email_args "$people" "$patchfile"
# NOTE: git-send-email handles cc itself
eval git send-email $send_email_args "$people" "$patchfile"
-rm "$patchfile"
-
# vim:noet
# vim:noet