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

Re: [RFC 2/3] am: semi working --cover-at-tip

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 17, 2017, 01:54 UTC
Message-ID
<xmqqlgj5u0u6.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<4bbaaf33-3796-4aa2-6434-ab79182274f5@suse.de>
Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.de> writes:
>> I thought about that.
Show 7 quoted lines
>> Is there a use case for cover after the last patch works and
>> removes the need to touch am_next (can be done out of the loop in
>> am_run).
>
> Do you have an opinion on that ? It has quite a big impact on how things are done !
> Single series only would mean a simple flush at the end.
> Multiple series makes things a whole lot complex.

I am not sure what you even mean. Are you wondering what "am" should do to a mbox with, say, these messages?

	1: [PATCH 0/2] Cover for series A
	2: [PATCH 1/2] patch 1 of series A
	3: [PATCH 2/2] patch 2 of series A
	4: [PATCH 0/3] Cover for series B
	5: [PATCH 1/3] patch 1 of series B
	6: [PATCH 2/3] patch 2 of series B
	7: [PATCH 2/3] patch 3 of series B

Running "am" on the whole thing and expecting covers to become the capping empty commit at the tip is crazy, I would think, for such a mbox, as there is no way to tell the command (after it processes 1, 2 and 3, to create commits out of 1, 2 and then an empty one out of 0 to finish one topic off) that it must create a new branch to store the next series, and building the second series on top of the capping empty commit at the tip of first series would not make any sense---the "tip empty commit" for the first series will no longer be at the "tip".

What I was alluding to is a different case, in which additional patches are sent as a follow-up later, ending up in a mbox like this:

	1: [PATCH 0/2] Cover for series A
	2: [PATCH 1/2] patch 1 of series A
	3: [PATCH 2/2] patch 2 of series A
	4: [PATCH 3/2] patch 3 of series A

Naturally, the cover letter may not list 3/2 in its short-log section, but the description for the overall goal and approach of the series in it should still be valid even with patch 3/2. The total number of messages mailsplit gives us would be 4, your subject parser would read "2" as the number of patches, which would make the number of messages for the series to be expected "3" (i.e. "2" plus cover), but "am" would want to create commits for patches 1, 2, and 3, and then cap it with the cover material.

Previous: Nicolas Morey-ChaisemartinNext: Nicolas Morey-Chaisemartin
Message 18 of 25 in “[RFC] cover-at-tip”
  1. Nicolas Morey-ChaisemartinNov 10, 2017
  2. Nicolas Morey-ChaisemartinNov 10, 2017
  3. Junio C HamanoNov 10, 2017
  4. Nicolas Morey-ChaisemartinNov 13, 2017
  5. Junio C HamanoNov 13, 2017
  6. Junio C HamanoNov 13, 2017
  7. Nicolas Morey-ChaisemartinNov 13, 2017
  8. 0/3 Add support for --cover-at-tipNicolas Morey-Chaisemartin, Nov 13, 2017
  9. Jonathan TanNov 13, 2017
  10. Nicolas Morey-ChaisemartinNov 13, 2017
  11. 1/3 mailinfo: extract patch series idNicolas Morey-Chaisemartin, Nov 13, 2017
  12. Junio C HamanoNov 14, 2017
  13. Nicolas Morey-ChaisemartinNov 14, 2017
  14. 2/3 am: semi working --cover-at-tipNicolas Morey-Chaisemartin, Nov 13, 2017
  15. Junio C HamanoNov 14, 2017
  16. Nicolas Morey-ChaisemartinNov 14, 2017
  17. Nicolas Morey-ChaisemartinNov 16, 2017
  18. Junio C HamanoNov 17, 2017
  19. 3/3 log: add an option to generate cover letter from a branch tipNicolas Morey-Chaisemartin, Nov 13, 2017
  20. Junio C HamanoNov 14, 2017
  21. Nicolas Morey-ChaisemartinNov 14, 2017
  22. Junio C HamanoNov 14, 2017
  23. Nicolas Morey-ChaisemartinNov 14, 2017
  24. Junio C HamanoNov 14, 2017
  25. Jonathan TanNov 10, 2017

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.