Replies: 1 comment 1 reply
-
I disagree on this one. At least for most of it. Sure, small "fix ruff" commits are kind of unnecessary and as a experienced programmer you should just amend your previous commits. But I think we should also make it as easy as possible to contribute. And in practice I haven't been bothered by it. Honestly I never understood the importance of a "clean" history. What workflows do you have where that matters? What I find myself doing a lot with respect to git history is finding a line of code that I don't understand and then go through the history of that line. This works quite fine in vscode and if there is a "fix ruff" commit its just one click through it to the next meaningful change. Otherwise I couldn't care less of how the history looks like and if its linear or not. As a software developer I also never worked in a project where this was important or cared for. Sure, everyone strives for "atomic commits", but this is a pipe dream in my opinion. Therefore arriving at a level where we can easily do cherry picking single commits for single features is unrealistic for an open source project with lots of inexperienced contributors. But I do agree that our PR handling is not optimal, but in the opposite direction. Instead of using squash and merge I would prefer if we have more commits. I have seen several PRs where the logic was contained in a single "atomic" commit. But once review comments came in the implementation was changed and then force-pushed to update the single commit. Even after several rounds of reviews there was only a single commit with the final state, similar to how squash and merge would look like. But by doing this we loose all the history of how we arrived at that point. Coming back to me looking at single line changes. I usually do this when I don't understand a line or think there is an easier way of doing this. Most of the time I find that "easier way" in the commit history and through the history understand that it missed some corner cases. So I am all for as many commits as possible. As a researcher I just hate losing information ;) And for a similar reason I would even like to go back to do merge commits. For me its much more obvious that way when and which PR got merged. Its also a lot easier to refresh stale branches than to do a rebase. The top answer of this Stack Overflow question is worth reading |
Beta Was this translation helpful? Give feedback.
-
Currently our commit history is (in my opinion) a mess. There are many small commits on there that are just fixes or small iterations after PR reviews, to get test passing or other minor stuff.
This has several disadvantages:
Therefor I would like to discuss a consistent merge policy. On a project I support @quaquel maintaining, we're using the policy below, in which we allow two merge methods. It serves us well and it could be a starting point for Mesa.
Beta Was this translation helpful? Give feedback.
All reactions