Re: mailman3 merge strategies (squashing commits vs. leaving commits as they are)

- Mailman Developers, since this seems like a general discussion topic.
On Thu, Aug 8, 2019, at 2:01 AM, Mike Gabriel wrote:
This looks surprising to me, I was hoping that it would use the title of the MR as the commit message and description as the description of the commit.
Looking a bit more closely at the documentation1, it looks like it will pickup:
I am going to keep an eye out for the commit message in future before merging, thanks for pointing this out.
This could have happened a few times in the past because I didn't know Gitlab would pick a commit message with the multi-line comment. However, this is not a general pattern that I am trying to enforce here.
It would be great to have single commit MRs, however, after the review, I'd prefer to have additional commits added to the MR as compared to sqashing + force push. Additional commits makes 2nd and 3rd reviews much more easy, since I can just look at the comments I made and the changes made in the newer commits.
Finally, we want the MR to be merged as a single commit, so we use the Gitlab's sqash-merge feature. It works okay most of the times, like I mentioned above.
Ideally, MRs are a complete unit and it doesn't make sense IMO to cherry-pick only parts of the MR. MRs should be atomic. If there are two independent things being done in a single MR, it should ideally be split into separate MRs and hence get merged as separate commits.
I hope I answered this above, but in summary, please squash commits when your Open the MR, but please don't force-push when you make requested changed from the review.
Also, we maintainers should be aware and just keep an eye out for the commit message. It is totally possible in Gitlab to change the Squash'd commit's message and in case Gitlab doesn't pick up the MR's title and desc, I'll try to pick it up manually.
Does that sound reasonable?
-- thanks, Abhilash Raj (maxking)

Abhilash Raj writes:
I seem to recall that somebody (one of the VCSes? one of the web repo hosting services?) has a system that squashes the commits and concatenates all the log messages for the merged branch. Perhaps gitlab has an option to do this?
Steve
-- Associate Professor Division of Policy and Planning Science http://turnbull.sk.tsukuba.ac.jp/ Faculty of Systems and Information Email: turnbull@sk.tsukuba.ac.jp University of Tsukuba Tel: 029-853-5175 Tennodai 1-1-1, Tsukuba 305-8573 JAPAN

On Fri, Aug 9, 2019, at 9:39 AM, Jim Popovitch via Mailman-Developers wrote:
It doesn't, atleast not that I could find. The only two strategies that it will use is to either use any commit with multi-line commit message or just pick up the MR's title. We ideally want it to always do the latter but I can't see a config for that.
I can manually change the message when merging, which I what I am going to try, if I can keep it in my mind when merging ofc ;-)
Yes, gitlab has an option to do this, it's a checkbox during the creation of the MR.
Yes, Gitlab does have this option and we do use that often.
The discussion is mostly about the output of the squashing and how does the commit message looks like.
-- thanks, Abhilash Raj (maxking)

Abhilash Raj writes:
I seem to recall that somebody (one of the VCSes? one of the web repo hosting services?) has a system that squashes the commits and concatenates all the log messages for the merged branch. Perhaps gitlab has an option to do this?
Steve
-- Associate Professor Division of Policy and Planning Science http://turnbull.sk.tsukuba.ac.jp/ Faculty of Systems and Information Email: turnbull@sk.tsukuba.ac.jp University of Tsukuba Tel: 029-853-5175 Tennodai 1-1-1, Tsukuba 305-8573 JAPAN

On Fri, Aug 9, 2019, at 9:39 AM, Jim Popovitch via Mailman-Developers wrote:
It doesn't, atleast not that I could find. The only two strategies that it will use is to either use any commit with multi-line commit message or just pick up the MR's title. We ideally want it to always do the latter but I can't see a config for that.
I can manually change the message when merging, which I what I am going to try, if I can keep it in my mind when merging ofc ;-)
Yes, gitlab has an option to do this, it's a checkbox during the creation of the MR.
Yes, Gitlab does have this option and we do use that often.
The discussion is mostly about the output of the squashing and how does the commit message looks like.
-- thanks, Abhilash Raj (maxking)
participants (3)
-
Abhilash Raj
-
Jim Popovitch
-
Stephen J. Turnbull