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

Re: [PATCH v2 2/4] Add format.coverauto boolean

From
FTFrank Terbeck <ft@bewatermyfriend.org>
Date
May 4, 2009, 21:41 UTC
Message-ID
<20090504214149.GA26208@fsst.voodoo.lan>
In-Reply-To
<780e0a6b0905041139x3a764768ocbbd8d9353ea568f@mail.gmail.com>
Stephen Boyd <bebarino@gmail.com>:
Show 10 quoted lines
> On Mon, May 4, 2009 at 2:59 AM, Frank Terbeck <ft@bewatermyfriend.org> wrote:
> > An exception is if it is called using the --stdout option,
> > which disables format.coverauto, because users of --stdout
> > (like git-rebase.sh) usually are not interested in
> > cover letters at all.
> >
> 
> Would it make more sense to just have git-rebase.sh use
> --cover-letter=never? I thought configuration variables were defaults
> which have to be overridden.

Could be done. And in an earlier version I did that. Since that took changes in more places, I reverted to this less intrusive approach.

Also, this will keep the scripts of people who use --stdout working, no matter what the settings of an individual user might be.

I don't think people who use --stdout will want the cover letter (which is always the same) in the output. Since you can still force its output, I think this would be reasonable compromise.

> Also, why does this variable even exist? I think Jeff's suggestion is
> best, where you can set format.coverletter to always, never, or some
> number.

Well, I did this because I wanted both Junio's and Jeff's suggestions to be incorporated.

Junio correctly stated, that nobody will usually want cover letters for one-patch "series". Which I think is right; and the wrapper I used for this before did take that into account as well. So coverletter had to default to 2.

If that where to enable the generation of cover letters for all format-patch calls with every patch series that is at least two patches long, it would change format-patch's default behaviour; potentially breaking people's scripts (similarly to the way coverauto=true could break git-rebase.sh without either adding --cover-letter=never or the exception in the --stdout codepath).

That's why I think this should be handled in two separate options. And as I mentioned, coverauto could be left out if we'd advise users who want that to create an git alias that does 'format-patch --cover-letter'.

Show 6 quoted lines
> > +	if (!strcmp(var, "format.coverauto")) {
> > +		cover_letter = git_config_bool(var, value);;
> > +		return 0;
> > +	}
> 
> Double semi-colon?

Oops, yeah. I'll resend this one (if coverauto turns out to be the way to go).

Regards, Frank
-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
Previous: Stephen BoydNext: Junio C Hamano
Message 13 of 21 in “more automation for cover letter generation”
  1. 0/6 more automation for cover letter generationFrank Terbeck, Apr 18, 2009
  2. 1/6 format-patch: add cover{letter,onepatch} optionsFrank Terbeck, Apr 18, 2009
  3. 2/6 Add documentation for format-patch's --cover-one-patchFrank Terbeck, Apr 18, 2009
  4. 3/6 Document format.coverletter and format.coveronepatchFrank Terbeck, Apr 18, 2009
  5. 4/6 format-patch: introduce overwritecoverletter optionFrank Terbeck, Apr 18, 2009
  6. 5/6 Add documentation for --cover-overwriteFrank Terbeck, Apr 18, 2009
  7. 6/6 Document format.overwritecoverletterFrank Terbeck, Apr 18, 2009
  8. Junio C HamanoApr 18, 2009
  9. 0/4 more automation for cover letter generationFrank Terbeck, May 4, 2009
  10. 1/4 Add format.coverletter optionFrank Terbeck, May 4, 2009
  11. 2/4 Add format.coverauto booleanFrank Terbeck, May 4, 2009
  12. Stephen BoydMay 4, 2009
  13. Frank TerbeckMay 4, 2009
  14. Junio C HamanoMay 4, 2009
  15. Frank TerbeckMay 5, 2009
  16. Junio C HamanoMay 5, 2009
  17. Frank TerbeckMay 5, 2009
  18. Frank TerbeckMay 5, 2009
  19. 3/4 Add tests for coverauto, coverletter and --cover-letterFrank Terbeck, May 4, 2009
  20. 4/4 Documentation for format.coverletter and --cover-letterFrank Terbeck, May 4, 2009
  21. Jeff KingApr 21, 2009

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.