File tree Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,24 @@ For developers to commit changes from Git
124124-----------------------------------------
125125
126126Once a patch is reviewed, you can select the "Squash and merge" button in the
127- GitHub web interface. You might need to rebase your change before pushing
128- it to the repo.
127+ GitHub web interface.
129128
130- LLVM currently has a linear-history policy, which means that merge commits are
131- not allowed. The `llvm-project ` repo on github is configured to reject pushes
132- that include merges, so the `git rebase ` step above is required.
129+ When pushing directly from the command-line to the ``main `` branch, you will need
130+ to rebase your change. LLVM has a linear-history policy, which means
131+ that merge commits are not allowed and the ``main `` branch is configured to reject
132+ pushes that include merges.
133+
134+ GitHub will display a message that looks like this:
135+
136+ .. code-block :: console
137+
138+ remote: Bypassed rule violations for refs/heads/main:
139+ remote:
140+ remote: - Required status check “buildkite/github-pull-requests” is expected.
141+
142+ This can seem scary, but this is just an artifact of the GitHub setup: it is
143+ intended as a warning for people merging pull-requests with failing CI. We can't
144+ disable it for people pushing on the command-line.
133145
134146Please ask for help if you're having trouble with your particular git workflow.
135147
Original file line number Diff line number Diff line change @@ -176,6 +176,28 @@ request will understand that you're rebasing just your patches, and display
176176this result correctly with a note that a force push did occur.
177177
178178
179+ Pre-merge Continuous Integration (CI)
180+ -------------------------------------
181+
182+ Multiple checks will be applied on a pull-request, either for linting/formatting
183+ or some build and tests. None of these are perfect and you will encounter
184+ false positive, infrastructure failures (unstable or unavailable worker), or
185+ you will be unlucky and based your change on a broken revision of the main branch.
186+
187+ None of the checks are strictly mandatory: these are tools to help us build a
188+ better codebase and be more productive (by avoiding issues found post-merge and
189+ possible reverts). As a developer you're empowered to exercise your judgement
190+ about bypassing any of the checks when merging code.
191+
192+ The infrastructure can print messages that make it seem like these are mandatory,
193+ but this is just an artifact of GitHub infrastructure and not a policy of the
194+ project.
195+
196+ However, please make sure you do not force-merge any changes that have clear
197+ test failures directly linked to your changes. Our policy is still to keep the
198+ ``main `` branch in a good condition, and introducing failures to be fixed later
199+ violates that policy.
200+
179201Problems After Landing Your Change
180202==================================
181203
You can’t perform that action at this time.
0 commit comments