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

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

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2009, 10:41 UTC
Message-ID
<7vvdof25oe.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090505084916.GB26208@fsst.voodoo.lan>
Frank Terbeck <ft@bewatermyfriend.org> writes:
Show 5 quoted lines
> ... That could potentially break
> people's existing scripts - either by new default behaviour or by the
> setting of format.coverletter of an individual user. That could still
> happen when using coverauto, so maybe my reasoning was flawed - given
> that Stephen raised the same question.

That part I agree with 100%. A separate configuration variable does not help here; it will not act as an "I know what I am doing" flag.

"rebase" is not a problem because both format-patch and rebase come from the same git and people do not mix and match. The only thing we need to do is to make sure that rebase is updated to explicitly decline the cover letter in the same or earlier version of git that adds this new option.

However, there are other people's scripts to worry about, and no matter what you do, you cannot avoid breaking them if you introduce a configuration variable that changes the behaviour of the command in a backward incompatible way. This could be a disruptive change that needs to happen at a major revision boundary, if we were to add it.

> If so, do you want coverletter to default to zero (which wouldn't
> change the default behaviour) or do you want it to default to two?

The default between 0 and 2 does not matter much. If people find this new feature useful (if not, then this new feature is not worth adding), then they will set it to non-zero themselves, and then get their scripts broken. In a sense, defaulting it to zero is just delaying an inevitable breakage.

If we were to do this, we should rather default it to two from day one and make sure we break people's scripts that (rightly) rely on format-patch not producing covers that the caller never asked, to make sure they are adjusted to decline cover explicitly. And such a release should come with a note in huge red letters that says "this new feature allows you not to say --cover on the command line, and it is far more important than keeping your scripts that run format-patch and process its output working. You must adjust your scripts to the new reality. Sorry for the inconvenience, and have a nice day."

I do not think I would stand behind such a release note, though.

For one thing, I do not see a huge need for this configuration variable. Why is "--cover" too cumbersome to type, when you are already willing to type "format-patch"? You can alias the whole thing away to make it even shorter. For another, we do not simply break people's scripts knowingly.

For this feature to go forward, somebody has to find a way not to break people's scripts even when the user uses it. One possibility is to find a nicer verb X and introduce "git X" command that does what "format-patch" does but with a better default (and syntax --- people get confused by the oldest form "git format-patch $commit", which does not behave like "git log $commit" simply because the syntax predates the modern "revision range" notation the "log" family supports, such as A..B).

Previous: Frank TerbeckNext: Frank Terbeck
Message 16 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.