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
$tg patch "$name" >"$patchfile"
-header="$(sed -e '/^$/,$d' "$patchfile")"
+header="$(sed -e '/^$/,$d' -e "s,','\\\\'',g" "$patchfile")"
to="$(echo "$header" | grep '^To:' | sed 's/To:\s*//')"
-# XXX: I can't get quoting right without arrays
-people=()
-[ -n "$from" ] && people=("${people[@]}" --from "$from")
+people=
+[ -n "$from" ] && people="$people --from '$from'"
# FIXME: there could be multimple To
-[ -n "$to" ] && people=("${people[@]}" --to "$to")
-
+[ -n "$to" ] && people="$people --to '$to'"
# NOTE: git-send-email handles cc itself
-git send-email $send_email_args "${people[@]}" "$patchfile"
+eval git send-email $send_email_args "$people" "$patchfile"
rm "$patchfile"
+
+# vim:noet