From: Bert Wesarg Date: Tue, 5 Aug 2008 19:13:30 +0000 (+0200) Subject: tg-create.sh: Introduce topgit.subjectprefix config option X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=76b849091afd7447212495a3f24f8faa8a36e4d6;hp=84bad158258c72b5e352e26d8a01eed9f7bf8224 tg-create.sh: Introduce topgit.subjectprefix config option 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 --- diff --git a/README b/README index bd4f17a..a4839f4 100644 --- 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. -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 diff --git a/tg-create.sh b/tg-create.sh index 5438deb..68c3fdd 100644 --- a/tg-create.sh +++ b/tg-create.sh @@ -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] $1" echo cat <