-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only allow rebase merging for PRs #802
Comments
I think of the merge strategies in terms of what kind of information is in the PR and needs to be maintained for future developers.
Based on the above, which totally call me out if I'm out of pocket, I would lean towards rebase merges. I like linear git histories. It makes using git blame locally easy. This does mean that each commit should be of the highest quality aka good commit message. And possibly pushing back on PR authors to clean up their commits before merging (or doing it yourself :P). @kylerisse help me understand this scenario because I'm not seeing it. When would we want to search a commit ID in order to find the associated PR? In case there was some discussion in the PR and it had context for why a commit did what it did? Examples of why I started using rebase merges more. Here is this repos history
Here is the history for my personal config (can you tell that I like the same naming convention as they use upstream?)
|
I don't know. Basically what you showed, the git graph doesn't work with a linear history. I was just trying to think of a downside and show a work around for it. It also came up when chatting with @jshcmpbll . I wasn't initially sure what the answer was. There could likely be some value to seeing a PR based on a git commit.
From what I have seen, a merge commit is a new
I believe that should be the idea with either strategy. |
Im all for the simplified commit history but Ive got some concerns about the
Agreed, I dont like these anyway we should just disable them outright.
I dont have merge access to nixpkgs but Ive seen a mix of PRs merged using various techniques (seems to be up to the merger). Heres a recent
Theres an additional merge commit which points to the parents branches: Im not sure why the narHash would be different if only the thing different were merge types since repo content would be the same in either case.
Using @djacu repo as an example: The following PR was I do like the naming conventions used upstream in nixpkgs 🙂 I dont know if post merge builds is worth the tradeoffs (I'll mention some below). I think the build time between changes that are triggered by different commit hashes is negligible since that doesnt effect everything thats been built and cached. Some concerns that come to mind here are: 1.Linear history is great but wouldnt this require that each PR rebase once another is merged regardless of a merge conflict? That seems like a fair bit of overhead for all contributors.
|
nvm all good |
Robert James Hernandez wrote:
1.Linear history is great but wouldnt this require that each PR rebase once another is merged regardless of a merge conflict? That seems like a fair bit of overhead for all contributors.
What I value more than a linear history is to have a PR be cleaned up before
submission, where the commits in the PR are clean at each step (not having
commit 10 fix a bug introduced in commit 2). This usually requires something
like an interactive rebase to reorder/squash commits, sometimes re-writing them.
basically, make the PR look as if you were perfect and knew exactly what you
were doing each step of the way :-)
Now, when bugs are only found after it's merged, then you do need to just add
the fix and accept that the history has a range where it's broken.
But pre-merge, things should be cleaned up if possible.
David Lang
|
Yes, agreed. I think that's unanimous opinion in the expectation of contributions to this repo and related scale repos.
We won't ever rewrite the history on |
Thanks @kylerisse for already making these changes against the repo settings in github: |
Description
I think we should only use rebase merges for our PRs. reasons:
One potential downside is it could be argued that it's slightly harder to determine which PR a commit goes with. That's easily worked around by using a search using the commit ID.
I'd love some feedback from @djacu @sarcasticadmin @MatthewCroughan .
Acceptance Criteria
We choose to do this or not to do this. Either way I believe we should at minimum disable squash merging and at least one of either merge commits or rebase merging in https://github.com/socallinuxexpo/scale-network/settings
What is the expected outcome that resolves this issue?
The text was updated successfully, but these errors were encountered: