chiark / gitweb /
create-help.sh: Fix 'tg update' generated help text
[topgit.git] / tg-create.sh
index d196e4f5fa56bbba8de8034a9c5366c478879f49..6cce7edebc1102bc9cfe86226f96ee40bc1ab8c0 100644 (file)
@@ -15,7 +15,7 @@ while [ -n "$1" ]; do
        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
@@ -107,7 +107,8 @@ author_addr="${author%> *}>"
        ! header="$(git config topgit.to)" || echo "To: $header"
        ! header="$(git config topgit.cc)" || echo "Cc: $header"
        ! header="$(git config topgit.bcc)" || echo "Bcc: $header"
-       echo "Subject: [PATCH] $1"
+       ! subject_prefix="$(git config topgit.subjectprefix)" || subject_prefix="$subject_prefix "
+       echo "Subject: [${subject_prefix}PATCH] $name"
        echo
        cat <<EOT
 <patch description>