chiark / gitweb /
tg-create.sh: Introduce topgit.subjectprefix config option
authorBert Wesarg <bert.wesarg@googlemail.com>
Tue, 5 Aug 2008 19:13:30 +0000 (21:13 +0200)
committerPetr Baudis <pasky@suse.cz>
Tue, 5 Aug 2008 22:18:11 +0000 (00:18 +0200)
Set the topgit.subjectprefix config option to prepend the string to the [PATCH]
field in the Subject: line of the '.topmsg' file.

[pb: Fixed conflicts and calling style.]

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
README
tg-create.sh

diff --git a/README b/README
index bd4f17a54d8b493e143469dd1e3d2a4eac9f07d1..a4839f45803b62ec2dcf06eda571c4b51fa89bf7 100644 (file)
--- a/README
+++ b/README
@@ -309,8 +309,8 @@ mail headers are inserted and the patch itself is appended.
 Thus, as your patches evolve, you can record nuances like whether
 the paricular patch should have To-list/Cc-maintainer or vice
 versa and similar nuances, if your project is into that.
 Thus, as your patches evolve, you can record nuances like whether
 the paricular patch should have To-list/Cc-maintainer or vice
 versa and similar nuances, if your project is into that.
-From is prefilled from your current GIT_AUTHOR_IDENT, the To,
-Cc and Bcc can be prefilled from optional topgit.{to,cc,bcc}.
+From is prefilled from your current GIT_AUTHOR_IDENT, other headers
+can be prefilled from various optional topgit.* config options.
 
        .topdeps: Contains the one-per-line list of branches
 your patch depends on, pre-seeded with `tg create`. (Continuously
 
        .topdeps: Contains the one-per-line list of branches
 your patch depends on, pre-seeded with `tg create`. (Continuously
index 5438debd0821b1d78e81e7f84d107482e689ca06..68c3fdd18bf253ed706016dbddee2b6a0915f848 100644 (file)
@@ -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"
        ! 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] $1"
        echo
        cat <<EOT
 <patch description>
        echo
        cat <<EOT
 <patch description>