git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH 5/5] Add a --cover-letter option to format-patch
Date: Tue, 19 Feb 2008 20:36:41 -0800	[thread overview]
Message-ID: <7vfxvodz1i.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: alpine.LNX.1.00.0802182254310.5816@iabervon.org

Daniel Barkalow <barkalow@iabervon.org> writes:

> +	const char *body = "*** SUBJECT HERE ***\n\n\n*** BLURB HERE ***\n";
> ...
> diff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
> new file mode 100644
> index 0000000..311e207
> --- /dev/null
> +++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
> @@ -0,0 +1,101 @@
> +$ git format-patch --stdout --cover-letter -n initial..master^
> +From 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 Mon Sep 17 00:00:00 2001
> +From: C O Mitter <committer@example.com>
> +Date: Mon, 26 Jun 2006 00:05:00 +0000
> +Subject: [DIFFERENT_PREFIX 0/2] *** SUBJECT HERE ***
> +
> +
> +*** BLURB HERE ***
> +
> +A U Thor (2):
> +      Second
> +      Third

I still disagree with your earlier point on the extra blank line
here.

When we give commit log template, we do leave an extra blank line
before we start the template material "# Please enter ...", to
ease typing, but it is different.  The template material does
not have to be removed by the end-user, so giving a blank line
upfront and starting the editor at that line is a usability
improvement, compared to the case where there is none.

But this "*** BLURB HERE ***" needs to be removed when the user
edits the cover-letter, and I really do not see any reason to
have an extra blank line in front of it.

Incidentally, I strongly suspect that if you do not have that
extra blank line, we would not even need to have the [PATCH 4/5]
(which is a slight regression) in the series.

So how about this squashed in, with [PATCH 4/5] skipped?


 builtin-log.c                                      |    2 +-
 ...tch_--stdout_--cover-letter_-n_initial..master^ |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index e26c986..0b348eb 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -629,7 +629,7 @@ static void make_cover_letter(struct rev_info *rev,
 	const char *origin_sha1, *head_sha1;
 	const char *argv[7];
 	const char *subject_start = NULL;
-	const char *body = "*** SUBJECT HERE ***\n\n\n*** BLURB HERE ***\n";
+	const char *body = "*** SUBJECT HERE ***\n\n*** BLURB HERE ***\n";
 	const char *msg;
 	const char *extra_headers = rev->extra_headers;
 	struct strbuf sb;
diff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
index 311e207..0151453 100644
--- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
+++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
@@ -4,7 +4,6 @@ From: C O Mitter <committer@example.com>
 Date: Mon, 26 Jun 2006 00:05:00 +0000
 Subject: [DIFFERENT_PREFIX 0/2] *** SUBJECT HERE ***
 
-
 *** BLURB HERE ***
 
 A U Thor (2):

  reply	other threads:[~2008-02-20  4:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1203392527.git.barkalow@iabervon.org>
2008-02-19  3:56 ` [PATCH 1/5] Add more tests for format-patch Daniel Barkalow
2008-02-19  3:56 ` [PATCH 2/5] Improve message-id generation flow control " Daniel Barkalow
2008-02-19 13:01   ` Johannes Schindelin
2008-02-19 16:26     ` Daniel Barkalow
2008-02-19 16:51       ` Johannes Schindelin
2008-02-19  3:56 ` [PATCH 3/5] Export some email and pretty-printing functions Daniel Barkalow
2008-02-19 13:06   ` Johannes Schindelin
2008-02-19 16:19     ` Daniel Barkalow
2008-02-19  3:56 ` [PATCH 4/5] Retain extra blank lines between the summary and the body Daniel Barkalow
2008-02-19  3:56 ` [PATCH 5/5] Add a --cover-letter option to format-patch Daniel Barkalow
2008-02-20  4:36   ` Junio C Hamano [this message]
2008-02-20 16:57     ` Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vfxvodz1i.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).