git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC 2/3] am: semi working --cover-at-tip
Date: Fri, 17 Nov 2017 10:54:09 +0900	[thread overview]
Message-ID: <xmqqlgj5u0u6.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <4bbaaf33-3796-4aa2-6434-ab79182274f5@suse.de> (Nicolas Morey-Chaisemartin's message of "Thu, 16 Nov 2017 17:21:40 +0100")

Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.de> writes:

>> I thought about that.

>> 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.

  reply	other threads:[~2017-11-17  1:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 10:24 [RFC] cover-at-tip Nicolas Morey-Chaisemartin
2017-11-10 15:37 ` Nicolas Morey-Chaisemartin
2017-11-10 18:22   ` Junio C Hamano
2017-11-13  7:58     ` Nicolas Morey-Chaisemartin
2017-11-13  9:48       ` Junio C Hamano
2017-11-13 10:30         ` Junio C Hamano
2017-11-13 10:48           ` Nicolas Morey-Chaisemartin
2017-11-13 17:13           ` [RFC 0/3] Add support for --cover-at-tip Nicolas Morey-Chaisemartin
2017-11-13 19:40             ` Jonathan Tan
2017-11-13 19:53               ` Nicolas Morey-Chaisemartin
2017-11-13 17:13           ` [RFC 1/3] mailinfo: extract patch series id Nicolas Morey-Chaisemartin
2017-11-14  5:47             ` Junio C Hamano
2017-11-14  9:10               ` Nicolas Morey-Chaisemartin
2017-11-13 17:13           ` [RFC 2/3] am: semi working --cover-at-tip Nicolas Morey-Chaisemartin
2017-11-14  6:00             ` Junio C Hamano
2017-11-14  9:17               ` Nicolas Morey-Chaisemartin
2017-11-16 16:21                 ` Nicolas Morey-Chaisemartin
2017-11-17  1:54                   ` Junio C Hamano [this message]
2017-11-13 17:13           ` [RFC 3/3] log: add an option to generate cover letter from a branch tip Nicolas Morey-Chaisemartin
2017-11-14  6:14             ` Junio C Hamano
2017-11-14  9:28               ` Nicolas Morey-Chaisemartin
2017-11-14 13:05                 ` Junio C Hamano
2017-11-14 13:40                   ` Nicolas Morey-Chaisemartin
2017-11-14 14:52                     ` Junio C Hamano
2017-11-10 18:28   ` [RFC] cover-at-tip Jonathan Tan

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqlgj5u0u6.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=NMoreyChaisemartin@suse.de \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).