git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg
@ 2008-08-05 19:13 Bert Wesarg
  2008-08-05 19:13 ` [TopGit PATCH 2/2] tg-create.sh: Introduce topgit.subjectprefix config option Bert Wesarg
  2008-08-06  5:10 ` [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg Bert Wesarg
  0 siblings, 2 replies; 5+ messages in thread
From: Bert Wesarg @ 2008-08-05 19:13 UTC (permalink / raw)
  To: Petr Baudis, Petr Baudis; +Cc: Bert Wesarg, git

$1 is unset after parsing all arguments, so use $name instead.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

---
 tg-create.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tg-create.sh b/tg-create.sh
index d196e4f..0bf329c 100644
--- a/tg-create.sh
+++ b/tg-create.sh
@@ -107,7 +107,7 @@ 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"
+	echo "Subject: [PATCH] $name"
 	echo
 	cat <<EOT
 <patch description>
-- 
tg: (24367cc..) t/fix-subject-line-in-.topmsg (depends on: master)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [TopGit PATCH 2/2] tg-create.sh: Introduce topgit.subjectprefix config option
  2008-08-05 19:13 [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg Bert Wesarg
@ 2008-08-05 19:13 ` Bert Wesarg
  2008-08-05 22:18   ` Petr Baudis
       [not found]   ` <20080805233930.GA1249@toroid.org>
  2008-08-06  5:10 ` [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg Bert Wesarg
  1 sibling, 2 replies; 5+ messages in thread
From: Bert Wesarg @ 2008-08-05 19:13 UTC (permalink / raw)
  To: Petr Baudis, Petr Baudis; +Cc: Bert Wesarg, git

Set the topgit.subjectprefix config option to prepend the string to the [PATCH]
field in the Subject: line of the '.topmsg' file.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

---
 README       |    7 ++++---
 tg-create.sh |    3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/README b/README
index bd4f17a..f821bab 100644
--- a/README
+++ b/README
@@ -204,9 +204,10 @@ tg create
 
 	After `tg create`, you should insert the patch description
 	to the '.topmsg' file, which will already contain some
-	pre-filled bits. You can set topgit.to, topgit.cc and topgit.bcc
-	configuration variables in order to have `tg create`
-	add these headers with given default values to '.topmsg'.
+	pre-filled bits. You can set topgit.subjectprefix, topgit.to,
+	topgit.cc and topgit.bcc configuration variables in order to
+	have `tg create` use this subject prefix and add these headers
+	with the given default values to '.topmsg', respectively.
 
 	The main task of `tg create` is to set up the topic branch
 	base from the dependencies. This may fail due to merge conflicts.
diff --git a/tg-create.sh b/tg-create.sh
index 0bf329c..c2b38bf 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] $name"
+	subject_prefix="$(git config topgit.subjectprefix)" && subject_prefix="$subject_prefix "
+	echo "Subject: [${subject_prefix}PATCH] $name"
 	echo
 	cat <<EOT
 <patch description>
-- 
tg: (2fc069d..) t/subject-prefix (depends on: t/fix-subject-line-in-.topmsg)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [TopGit PATCH 2/2] tg-create.sh: Introduce topgit.subjectprefix config option
  2008-08-05 19:13 ` [TopGit PATCH 2/2] tg-create.sh: Introduce topgit.subjectprefix config option Bert Wesarg
@ 2008-08-05 22:18   ` Petr Baudis
       [not found]   ` <20080805233930.GA1249@toroid.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Petr Baudis @ 2008-08-05 22:18 UTC (permalink / raw)
  To: Bert Wesarg; +Cc: git

  Hi,

On Tue, Aug 05, 2008 at 09:13:30PM +0200, Bert Wesarg wrote:
> Set the topgit.subjectprefix config option to prepend the string to the [PATCH]
> field in the Subject: line of the '.topmsg' file.
> 
> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

  hmm, the patch does not apply as-is because $1 -> $name got changed in
t/fix-subject-line-in-.topmsg which you didn't submit (I *instantly*
knew adding the depends line to the patch will be good idea ;-).

  Actually, the line was always meant to be just empty, but putting the
patch name there does no harm. I will change that.

> ---
>  README       |    7 ++++---
>  tg-create.sh |    3 ++-
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/README b/README
> index bd4f17a..f821bab 100644
> --- a/README
> +++ b/README
> @@ -204,9 +204,10 @@ tg create
>  
>  	After `tg create`, you should insert the patch description
>  	to the '.topmsg' file, which will already contain some
> -	pre-filled bits. You can set topgit.to, topgit.cc and topgit.bcc
> -	configuration variables in order to have `tg create`
> -	add these headers with given default values to '.topmsg'.
> +	pre-filled bits. You can set topgit.subjectprefix, topgit.to,
> +	topgit.cc and topgit.bcc configuration variables in order to
> +	have `tg create` use this subject prefix and add these headers
> +	with the given default values to '.topmsg', respectively.
>  
>  	The main task of `tg create` is to set up the topic branch
>  	base from the dependencies. This may fail due to merge conflicts.
> diff --git a/tg-create.sh b/tg-create.sh
> index 0bf329c..c2b38bf 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] $name"
> +	subject_prefix="$(git config topgit.subjectprefix)" && subject_prefix="$subject_prefix "
> +	echo "Subject: [${subject_prefix}PATCH] $name"
>  	echo
>  	cat <<EOT
>  <patch description>

  I have converted this to the ||-form since that's much clearer with
set -e.

  Thanks,

-- 
				Petr "Pasky" Baudis
The next generation of interesting software will be done
on the Macintosh, not the IBM PC.  -- Bill Gates

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [TopGit PATCH 2/2] tg-create.sh: Introduce topgit.subjectprefix config option
       [not found]   ` <20080805233930.GA1249@toroid.org>
@ 2008-08-06  5:08     ` Bert Wesarg
  0 siblings, 0 replies; 5+ messages in thread
From: Bert Wesarg @ 2008-08-06  5:08 UTC (permalink / raw)
  To: Abhijit Menon-Sen, Git Mailing List

On Wed, Aug 6, 2008 at 01:39, Abhijit Menon-Sen <ams@toroid.org> wrote:
> Hi Bert.
>
> I'm wondering how you managed to get two To: fields in your patch mail.
> Is it a git-send-email bug, or did you do something special?
Yeah, I noticed this too, I have a To: line in the mail file, formated
from tg patch, and than send it with git-send-mail with an --to
option. without this option git-send-mail has asked me for the
recipient.

Any help would be appreciate.

Thanks
Bert

>
> -- ams
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg
  2008-08-05 19:13 [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg Bert Wesarg
  2008-08-05 19:13 ` [TopGit PATCH 2/2] tg-create.sh: Introduce topgit.subjectprefix config option Bert Wesarg
@ 2008-08-06  5:10 ` Bert Wesarg
  1 sibling, 0 replies; 5+ messages in thread
From: Bert Wesarg @ 2008-08-06  5:10 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Bert Wesarg, git

Just a resend, because Petr didn't get this mail.

Bert

On Tue, Aug 5, 2008 at 21:13, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> $1 is unset after parsing all arguments, so use $name instead.
>
> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>
> ---
>  tg-create.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tg-create.sh b/tg-create.sh
> index d196e4f..0bf329c 100644
> --- a/tg-create.sh
> +++ b/tg-create.sh
> @@ -107,7 +107,7 @@ 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"
> +       echo "Subject: [PATCH] $name"
>        echo
>        cat <<EOT
>  <patch description>
> --
> tg: (24367cc..) t/fix-subject-line-in-.topmsg (depends on: master)
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-06  5:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 19:13 [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg Bert Wesarg
2008-08-05 19:13 ` [TopGit PATCH 2/2] tg-create.sh: Introduce topgit.subjectprefix config option Bert Wesarg
2008-08-05 22:18   ` Petr Baudis
     [not found]   ` <20080805233930.GA1249@toroid.org>
2008-08-06  5:08     ` Bert Wesarg
2008-08-06  5:10 ` [TopGit PATCH 1/2] Fix generated Subject: line in .topmsg Bert Wesarg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).