adangel commented on PR #144:
URL: https://github.com/apache/maven-pmd-plugin/pull/144#issuecomment-2104232352

   > @adangel That merge was a pile of junk. You imported all intermediate work 
into master making it impossible to trace down the actual change. Don't do that 
again please, always squash and rebase first. Clearly a -1 for the methodology.
   
   I was not aware, that the general rule of thumb for merging PRs is "squash 
and rebase". If this is the common
   decision around the maven project, then I'd expect this to be clearly 
documented, e.g. on https://maven.apache.org/developers/conventions/git.html .
   I'm missing there an example on how to merge PRs which consist of more than 
one commits. E.g. it says there
   "commit it to a branch, fix it up, and merge the branch." instead of "commit 
it to a branch, fix it up and squash and rebase this branch onto master/main".
   To be honest, I'm not sure if it would have prevented my merge push... 
(because I don't think I would have read this doc before pushing).
   
   Following the discussion on 
https://github.com/apache/maven-fluido-skin/pull/39#issuecomment-1166243030 - 
which is very helpful - it seems
   the decision is to try to have a linear history on the master/main branch:
   
   > Simply we require linear commit on master branch - from master perspective 
final result is important - we needn't history of work on PR in master.
   
   This decision should be somehow officially be documented to be transparent 
for everyone...
   
   For me, as a casual committer, who only pushes once every blue moon and 
working mostly on other projects, I would suggest to
   - Update the PR Template on GitHub with a section "Before merging... Maven 
Project requires a linear history, ... squash+rebase. Either before merge or 
whoever merges this. See also 
https://maven.apache.org/developers/conventions/git.html";. I think, this would 
help to remember this decision.
   - Enforce via push/update hook to prevent merge commits pushed to 
master/main. GitHub has some options to enforce a linear history. I'm sure, the 
infra team can configure something similar on gitbox.apache.org. That would at 
least prevent someone like me from simply pushing a merge. Of course, it 
wouldn't  prevent me from pushing the complete rebased history of a PR (which 
is also not desired)...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to