arg="$1"; shift
case "$arg" in
-*)
- echo "Usage: tg create [-d DEPS...] NAME" >&2
+ echo "Usage: tg create NAME [DEPS...]" >&2
exit 1;;
*)
if [ -z "$name" ]; then
author_addr="${author%> *}>"
{
echo "From: $author_addr"
- echo "Subject: [PATCH] $1"
+ ! header="$(git config topgit.to)" || echo "To: $header"
+ ! header="$(git config topgit.cc)" || echo "Cc: $header"
+ ! header="$(git config topgit.bcc)" || echo "Bcc: $header"
+ ! subject_prefix="$(git config topgit.subjectprefix)" || subject_prefix="$subject_prefix "
+ echo "Subject: [${subject_prefix}PATCH] $name"
echo
cat <<EOT
<patch description>