git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/5] Add a --cover-letter option to format-patch

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Feb 20, 2008, 16:57 UTC
Message-ID
<alpine.LNX.1.00.0802201143180.19024@iabervon.org>
In-Reply-To
<7vfxvodz1i.fsf@gitster.siamese.dyndns.org>
On Tue, 19 Feb 2008, Junio C Hamano wrote:
Show 42 quoted lines
> 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?

Sure. I still like the extra line, but it's not that big a deal. (And I still think it's odd that the code removes extra blank lines from that spot but not elsewhere, but likewise not a big deal)

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C Hamano
Message 12 of 12 in “Add more tests for format-patch”
  1. 1/5 Add more tests for format-patchDaniel Barkalow, Feb 19, 2008
  2. 2/5 Improve message-id generation flow control for format-patchDaniel Barkalow, Feb 19, 2008
  3. Johannes SchindelinFeb 19, 2008
  4. Daniel BarkalowFeb 19, 2008
  5. Johannes SchindelinFeb 19, 2008
  6. 3/5 Export some email and pretty-printing functionsDaniel Barkalow, Feb 19, 2008
  7. Johannes SchindelinFeb 19, 2008
  8. Daniel BarkalowFeb 19, 2008
  9. 4/5 Retain extra blank lines between the summary and the bodyDaniel Barkalow, Feb 19, 2008
  10. 5/5 Add a --cover-letter option to format-patchDaniel Barkalow, Feb 19, 2008
  11. Junio C HamanoFeb 20, 2008
  12. Daniel BarkalowFeb 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.