[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH 2/3] git send-email: do not ask questions when
From:       Ian Hilt <ihilt () mcgregor-surmount ! com>
Date:       2008-10-31 22:01:49
Message-ID: 20081031220149.GD21345 () maintenance05 ! msc ! mcgregor-surmount ! com
[Download RAW message or body]

On Fri, Oct 31, 2008 at 10:38:03PM +0100, Pierre Habouzit wrote:
> On Fri, Oct 31, 2008 at 09:33:38PM +0000, Ian Hilt wrote:
> > On Fri, Oct 31, 2008 at 01:36:48PM +0100, Pierre Habouzit wrote:
> > > +GIT: Please enter your email below this line.
> > 
> > At first glance I thought this meant to enter my email address here.
> > So, instead of "email" would "message" be better?  Although on second
> > glance I realized this is where the body of the message went.  Not sure
> > if this is worth changing.
> 
> Well, this line sounds kind of awkward actually, so I was even thinking
> about removing it.
> 
> Decent editors should probably have a plugin to put the cursor here and
> be done with it.
> 
> 
> In fact what looks odd is the GIT: stuff. a line looking like:
> 
>     --- write your message below this line ---
> 
> Looks 10x better, though need some code to strip it out if the user kept
> it, and I'm lazy, GIT: stuff is automatically removed...

Or, to follow the convention of git-status and git-commit, you could do
this with "# ".

So something like,

--->8---
From: Ian Hilt <ihilt@mcgregor-surmount.com>
Date: Fri, 31 Oct 2008 17:55:46 -0400
Subject: [PATCH] Use a hash instead of GIT: for line removal

Signed-off-by: Ian Hilt <ihilt@mcgregor-surmount.com>
---
 git-send-email.perl |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 5cebb40..c6e21a8 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -427,7 +427,7 @@ sub get_patch_subject($) {
 	while (my $line = <$fh>) {
 		next unless ($line =~ /^Subject: (.*)$/);
 		close $fh;
-		return "GIT: $1\n";
+		return "# $1\n";
 	}
 	close $fh;
 	die "No subject line in $fn ?";
@@ -446,14 +446,14 @@ if ($compose) {
 
 	print C <<EOT;
 From $tpl_sender # This line is ignored.
-GIT: Lines beginning in "GIT: " will be removed.
-GIT: Consider including an overall diffstat or table of contents
-GIT: for the patch you are writing.
+# Lines beginning in "# " will be removed.
+# Consider including an overall diffstat or table of contents
+# for the patch you are writing.
 From: $tpl_sender
 Subject: $tpl_subject
 In-Reply-To: $tpl_reply_to
 
-GIT: Please enter your email below this line.
+# --- write your message below this line ---
 
 EOT
 	for my $f (@files) {
@@ -479,7 +479,7 @@ EOT
 	my $in_body = 0;
 	my $summary_empty = 1;
 	while(<C>) {
-		next if m/^GIT: /;
+		next if m/^# /;
 		if ($in_body) {
 		} elsif (/^\n$/) {
 			$in_body = 1;
--->8---

> But if that's the only thing that you don't like in the series, I'm
> glad, this is quite a minor issue ;)

I've thought something like this would be a good thing.  An editor makes
things easier to fix than the command-line.

	Ian
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic