On Tue, Nov 17, 2026 at 12:55 PM Joe Orton via dev <[email protected]> wrote: > > On Tue, Nov 17, 2026 at 12:14:58AM +0100, Yann Ylavic wrote: > > On Mon, Nov 16, 2026 at 9:10 PM Ruediger Pluem via dev > > <[email protected]> wrote: > > > > > > Do we have any preferred merging approach (squash and merge vs rebase and > > > merge) for PRs > > > > For squash vs rebase I think we should allow both, at least when > > targeting trunk. It depends on whether the PR is simple enough to be a > > single commit or if it wants/deserves multiple commits. > > For a single commit a final squash and merge allows to push to the PR > > successively to fix/improve the changes without all the > > intermediate/transient work to make it to the target branch. > > If the PR is bigger and staged (to ease review), I think the staging > > should be preserved in the target branch too with a final rebase and > > merge. > > It seems that the third option (merge commit) isn't available in httpd > > currently. It would be my preference for bigger PRs because it'd allow > > to merge a full PR that made it to trunk back to 2.4.x with a single > > cherry-pick (of the merge commit). Not a strong opinion either, I just > > find it convenient, but the hierarchy would not be flat anymore. > > I disabled merge commits in the trunk .asf.yaml because I figured we're > more familiar with having the linear history here, it's just an asfyaml > setting. I also don't have strong views on this, not a huge fan of merge > commits but merging big PRs via rebase seems a bit spammy and squashing > is often wrong. So maybe merge commits are the least bad option.
The thing to worry about maybe with merge commits is that if a contributor creates a PR with a branch itself containing merges from multiple forks/repositories, merging the PR will preserve the whole history hence possibly a complex/spaghetti/octopus thingy in httpd which may not be noticeable when reviewing (I never saw one myself to be honest). > > > > and if yes is it the same for trunk PRs and 2.4.x PRs? > > > > In 2.4.x we probably want to preserve the original commits/staging, so > > rebase when there is more than one commit? > > I think it's fine for 2.4.x to squash-merge if we retain the original > commit messages, we can tweak the default here in asfyaml: > https://github.com/apache/infrastructure-asfyaml/blob/main/README.md#merge-buttons > The default is quite bad since it's easy to discard all the commit > messages (which I've done several times now probably). I will fix that > now in fact, should not be controversial. +1 > > P.S. good to see you here again, Yann :) Thanks ;)
