threads / patch / 7903

patchChecklist clarifications: added "Commits", "Patch:" headings

Subject: [PATCH] Checklist clarifications: added "Commits", "Patch:" headings

## tl;dr

9 messages between Apr 30, 2007 and May 1, 2007. Diffs are folded; open one to read it.

replies: 8people: 4as markdown or json

Jari Aalto· Apr 30, 2007, 11:04 UTC · lore
Added email address and message 'Send your patch to...'
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 Documentation/SubmittingPatches |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
Show changes to Documentation/SubmittingPatches +8 −1
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 2386f49..238d410 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -1,5 +1,7 @@
 Checklist (and a short version for the impatient):
 
+	Commits:
+
 	- make commits of logical units
 	- check for unnecessary whitespace with "git diff --check"
 	  before committing
@@ -12,8 +14,13 @@ Checklist (and a short version for the impatient):
 	  commit message (or just use the option "-s" when
 	  committing) to confirm that you agree to the Developer's
 	  Certificate of Origin
+
+	Patch:
+
+	- send your patch to <git@vger.kernel.org> by using
+	  git-format-patch(1) with option "-M". See also
+	  git-send-email(1).
 	- do not PGP sign your patch
-	- use "git format-patch -M" to create the patch
 	- do not attach your patch, but read in the mail
 	  body, unless you cannot teach your mailer to
 	  leave the formatting of the patch alone.
-- 
1.5.1.2.GIT
Johannes Schindelin· Apr 30, 2007, 11:36 UTC · re: Jari Aalto · lore

Re: [PATCH] Checklist clarifications: added "Commits", "Patch:" headings

Hi,
On Mon, 30 Apr 2007, Jari Aalto wrote:
Show 5 quoted lines
> +	- send your patch to <git@vger.kernel.org> by using
> +	  git-format-patch(1) with option "-M". See also
> +	  git-send-email(1).
>  	- do not PGP sign your patch
> -	- use "git format-patch -M" to create the patch
NACK.

I never use send-email myself. There are even technical issues to my excuse: sometimes I cannot send the mails from my machine. So, this should not be a _replacement_ for `git format-patch -M && send mail manually`, but only an _alternative_.

However, my impression was that many people had problems when first sending patches with send-email. There should be _at least_ a word of caution, that you should test the operation on something different than the Git list first.

Ciao, Dscho

Jari Aalto· Apr 30, 2007, 12:02 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Checklist clarifications: added "Commits", "Patch:" headings

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 21 quoted lines
> Hi,
>
> On Mon, 30 Apr 2007, Jari Aalto wrote:
>
>> +	- send your patch to <git@vger.kernel.org> by using
>> +	  git-format-patch(1) with option "-M". See also
>> +	  git-send-email(1).
>>  	- do not PGP sign your patch
>> -	- use "git format-patch -M" to create the patch
>
> NACK.
>
> I never use send-email myself. There are even technical issues to my 
> excuse: sometimes I cannot send the mails from my machine. So, this should 
> not be a _replacement_ for `git format-patch -M && send mail manually`, 
> but only an _alternative_.
>
> However, my impression was that many people had problems when first 
> sending patches with send-email. There should be _at least_ a word of 
> caution, that you should test the operation on something different than 
> the Git list first.
Is this workding okay?
        - send your patch to <git@vger.kernel.org> by using
          git-format-patch(1) with option "-M". If you use  
          git-send-email(1), please test it first by sending 
          email to yourself.
Jari
Julian Phillips· Apr 30, 2007, 12:09 UTC · re: Jari Aalto · lore

Re: [PATCH] Checklist clarifications: added "Commits", "Patch:" headings

On Mon, 30 Apr 2007, Jari Aalto wrote:
Show 6 quoted lines
> Is this workding okay?
>
>        - send your patch to <git@vger.kernel.org> by using
>          git-format-patch(1) with option "-M". If you use
>          git-send-email(1), please test it first by sending
>          email to yourself.

I don't want to seem picky, but that wording suggests to me that the -M option to format-patch magically sends patches to the list. Why not just have:

 	- use "git format-patch -M" to create the patch
 	- send your patch to <git@vger.kernel.org>. If you use
 	  git-send-email(1), please test it first by sending
 	  email to yourself.
-- 
Julian

  ---
My mother loved children -- she would have given anything if I had been one.
 		-- Groucho Marx
Johannes Schindelin· Apr 30, 2007, 12:42 UTC · re: Julian Phillips · lore

Re: [PATCH] Checklist clarifications: added "Commits", "Patch:" headings

Hi,
On Mon, 30 Apr 2007, Julian Phillips wrote:
Show 17 quoted lines
> On Mon, 30 Apr 2007, Jari Aalto wrote:
> 
> > Is this workding okay?
> > 
> >        - send your patch to <git@vger.kernel.org> by using
> >          git-format-patch(1) with option "-M". If you use
> >          git-send-email(1), please test it first by sending
> >          email to yourself.
> 
> I don't want to seem picky, but that wording suggests to me that the -M
> option to format-patch magically sends patches to the list.  Why not just
> have:
> 
> 	- use "git format-patch -M" to create the patch
> 	- send your patch to <git@vger.kernel.org>. If you use
> 	  git-send-email(1), please test it first by sending
> 	  email to yourself.
Yes, I like that much better!

Thank you, Dscho

Jari Aalto· Apr 30, 2007, 16:04 UTC · re: Julian Phillips · lore

Re: [PATCH] v2: Checklist clarifications: added "Commits", "Patch:" headings

>From e65853b7bede747912a51fd77d5cf62fb255b116 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Mon, 30 Apr 2007 18:57:25 +0300
Subject: [PATCH] Checklist clarifications: added Commits, Patch: headings
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 This is version 2 of the orignal patch. Corrected according
 to Julian Phillips's comments.
 Documentation/SubmittingPatches |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
Show changes to Documentation/SubmittingPatches +9 −1
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 2386f49..6a4da2d 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -1,5 +1,7 @@
 Checklist (and a short version for the impatient):
 
+	Commits:
+
 	- make commits of logical units
 	- check for unnecessary whitespace with "git diff --check"
 	  before committing
@@ -12,8 +14,14 @@ Checklist (and a short version for the impatient):
 	  commit message (or just use the option "-s" when
 	  committing) to confirm that you agree to the Developer's
 	  Certificate of Origin
-	- do not PGP sign your patch
+
+	Patch:
+
 	- use "git format-patch -M" to create the patch
+	- send your patch to <git@vger.kernel.org>. If you use
+	  git-send-email(1), please test it first by sending
+	  email to yourself.
+	- do not PGP sign your patch
 	- do not attach your patch, but read in the mail
 	  body, unless you cannot teach your mailer to
 	  leave the formatting of the patch alone.
-- 
1.5.1.2.GIT
Junio C Hamano· Apr 30, 2007, 23:35 UTC · re: Jari Aalto · lore

Re: [PATCH] v2: Checklist clarifications: added "Commits", "Patch:" headings

Jari Aalto <jari.aalto@cante.net> writes:
Show 9 quoted lines
> From e65853b7bede747912a51fd77d5cf62fb255b116 Mon Sep 17 00:00:00 2001
> From: Jari Aalto <jari.aalto@cante.net>
> Date: Mon, 30 Apr 2007 18:57:25 +0300
> Subject: [PATCH] Checklist clarifications: added Commits, Patch: headings
>
> Signed-off-by: Jari Aalto <jari.aalto@cante.net>
> ---
>  This is version 2 of the orignal patch. Corrected according
>  to Julian Phillips's comments.
The first one was well formatted, but this one is not quite.
Do not have "v2" outside of "[PATCH ...]".
I'll apply it by hand as the text itself feels an improvement.
Thanks.
Junio C Hamano· Apr 30, 2007, 21:00 UTC · re: Johannes Schindelin · lore

[PATCH] send-email: add a few config variables.

This adds from, to, suppressfrom and nosignedoffcc configuration variables to git-send-email, so that these common options do not have to be given from the command line all the time.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * I do not use send-email myself that often, but it irritated
   me enough that there do not seem to be a way to set these
   common things in the configuration.  Maybe I was missing
   something obvious and this patch is not needed.  I dunno.
 Documentation/git-send-email.txt |   17 +++++++++++++++++
 git-send-email.perl              |   30 +++++++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 5 deletions(-)
Show changes to 2 files +42 −5

Documentation/git-send-email.txt, git-send-email.perl

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 795db87..3435b8c 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -119,6 +119,23 @@ sendemail.chainreplyto::
 	Boolean value specifying the default to the '--chain_reply_to'
 	parameter.
 
+sendemail.fromme::
+	Boolean; when set, use your authorname and authoremail
+	(typically found in `.git/config` as user.name and
+	user.email variables) if `--from` option is not given.
+
+sendemail.to::
+	When `--to` is not specified on the command line, use
+	this address instead.
+
+sendemail.suppressfrom::
+	Boolean; when set, act as if `--suppress-from` is given
+	on the command line.
+
+sendemail.nosignedoffcc::
+	Boolean; when set, act as if `--no-signed-off-cc` is
+	given on the command line.
+
 sendemail.smtpserver::
 	Default smtp server to use.
 
diff --git a/git-send-email.perl b/git-send-email.perl
index a6e3e02..785fb75 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -164,6 +164,18 @@ if (!@bcclist or !$bcclist[0]) {
     @bcclist = ();
 }
 
+my $fromme;
+
+for my $ent (['fromme', \$fromme],
+	     ['suppressfrom', \$suppress_from],
+	     ['nosignedoffcc', \$no_signed_off_cc]) {
+	my $val = $repo->config_boolean('sendemail.' . $ent->[0]);
+	my $var = $ent->[1];
+	${$var} = (! ($val && $val eq 'false'));
+}
+
+my $default_to = $repo->config('sendmail.to');
+
 # Begin by accumulating all the variables (defined above), that we will end up
 # needing, first, from the command line:
 
@@ -187,6 +199,19 @@ unless ($rc) {
     usage();
 }
 
+# Now, let's fill any that aren't set in with defaults:
+
+my ($author) = $repo->ident_person('author');
+my ($committer) = $repo->ident_person('committer');
+
+if ($fromme && !defined $from) {
+	$from = $author;
+}
+
+if (!@to && $default_to ne '') {
+	push @to, $default_to;
+}
+
 # Verify the user input
 
 foreach my $entry (@to) {
@@ -201,11 +226,6 @@ foreach my $entry (@bcclist) {
 	die "Comma in --bcclist entry: $entry'\n" unless $entry !~ m/,/;
 }
 
-# Now, let's fill any that aren't set in with defaults:
-
-my ($author) = $repo->ident_person('author');
-my ($committer) = $repo->ident_person('committer');
-
 my %aliases;
 my @alias_files = $repo->config('sendemail.aliasesfile');
 my $aliasfiletype = $repo->config('sendemail.aliasfiletype');
-- 
1.5.2.rc0.781.g5868
Junio C Hamano· May 1, 2007, 04:11 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Checklist clarifications: added "Commits", "Patch:" headings

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> However, my impression was that many people had problems when first 
> sending patches with send-email. There should be _at least_ a word of 
> caution, that you should test the operation on something different than 
> the Git list first.

Also an EXAMPLES section to Documentation/git-send-email.txt would be useful.

← back to recent threads