You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for more information on helping with translations.
89
+
90
+
If a pull request is not to be considered for merging (yet), please
85
91
prefix the title with [WIP] or use [Tasks Lists](https://help.github.com/articles/basic-writing-and-formatting-syntax/#task-lists)
86
92
in the body of the pull request to indicate tasks are pending.
87
93
@@ -94,6 +100,8 @@ At this stage one should expect comments and review from other contributors. You
94
100
can add more commits to your pull request by committing them locally and pushing
95
101
to your fork until you have satisfied all feedback.
96
102
103
+
Note: Code review is a burdensome but important part of the development process, and as such, certain types of pull requests are rejected. In general, if the **improvements** do not warrant the **review effort** required, the PR has a high chance of being rejected. It is up to the PR author to convince the reviewers that the changes warrant the review effort, and if reviewers are "Concept NAK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes.
104
+
97
105
Squashing Commits
98
106
---------------------------
99
107
If your pull request is accepted for merging, you may be asked by a maintainer
@@ -102,12 +110,16 @@ before it will be merged. The basic squashing workflow is shown below.
102
110
103
111
git checkout your_branch_name
104
112
git rebase -i HEAD~n
105
-
# n is normally the number of commits in the pull
106
-
# set commits from 'pick' to 'squash', save and quit
107
-
# on the next screen, edit/refine commit messages
108
-
# save and quit
113
+
# n is normally the number of commits in the pull request.
114
+
# Set commits (except the one in the first line) from 'pick' to 'squash', save and quit.
115
+
# On the next screen, edit/refine commit messages.
116
+
# Save and quit.
109
117
git push -f # (force push to GitHub)
110
118
119
+
Please update the resulting commit message if needed, it should read as a
120
+
coherent message. In most cases this means that you should not just list the
121
+
interim commits.
122
+
111
123
If you have problems with squashing (or other workflows with `git`), you can
112
124
alternatively enable "Allow edits from maintainers" in the right GitHub
113
125
sidebar and ask for help in the pull request.
@@ -120,11 +132,37 @@ the respective change set.
120
132
The length of time required for peer review is unpredictable and will vary from
121
133
pull request to pull request.
122
134
135
+
Rebasing Pull Requests
136
+
-------------------------
137
+
It may become necessary for a pull request to be rebased after other pull requests have been
138
+
merged. This is typically due to mutually exclusive changes (conflicts) between your pull
139
+
request and the current `master` branch.
140
+
141
+
When a rebase is needed, a comment will be added to the pull request indicating this need.
142
+
Rather than simply merge the `master` branch into your pull request (which results in an
143
+
ugly and confusing merge commit), it is better to use git's rebase feature. The basic
144
+
workflow is as follows:
145
+
146
+
# replace 'origin' with the remote name for the main project repo in the example
147
+
git checkout your_branch_name
148
+
git fetch origin
149
+
git pull --rebase origin master
150
+
151
+
This will "rewind" your branch commits, pull any new commits from `master`, then attempt to
152
+
re-apply your commits on top of the new HEAD. If any conflicts are found, the process will
153
+
pause and allow you to resolve any conflicts. Once conflicts have been resolved:
154
+
155
+
git rebase --continue
156
+
157
+
Repeat as necessary until there are no more conflicts and your git tree is in a clean state.
158
+
The final step is to push your rebased branch back up to github:
159
+
160
+
git push -f # force pushes the branch to github
123
161
124
162
Pull Request Philosophy
125
163
-----------------------
126
164
127
-
Patch sets should always be focused. For example, a pull request could add a
165
+
Patchsets should always be focused. For example, a pull request could add a
128
166
feature, fix a bug, or refactor code; but not a mixture. Please also avoid super
129
167
pull requests which attempt to do too much, are overly large, or overly complex
130
168
as this makes review difficult.
@@ -148,10 +186,18 @@ There are three categories of refactoring, code only moves, code style fixes,
148
186
code refactoring. In general refactoring pull requests should not mix these
149
187
three kinds of activity in order to make refactoring pull requests easy to
150
188
review and uncontroversial. In all cases, refactoring PRs must not change the
151
-
behavior of code within the pull request (bugs must be preserved as is).
189
+
behaviour of code within the pull request (bugs must be preserved as is).
152
190
153
191
Project maintainers aim for a quick turnaround on refactoring pull requests, so
154
-
where possible keep them short, un-complex and easy to verify.
192
+
where possible keep them short, uncomplex and easy to verify.
193
+
194
+
Pull requests that refactor the code should not be made by new contributors. It
195
+
requires a certain level of experience to know where the code belongs and to
196
+
understand the full ramification (including rebase effort of open pull requests).
197
+
198
+
Trivial pull requests or pull requests that refactor the code with no clear
199
+
benefits may be immediately closed by the maintainers to reduce unnecessary
200
+
workload on reviewing.
155
201
156
202
157
203
"Decision Making" Process
@@ -169,9 +215,9 @@ judge the general consensus of contributors.
169
215
170
216
In general, all pull requests must:
171
217
172
-
-have a clear use case, fix a demonstrable bug or serve the greater good of
218
+
-Have a clear use case, fix a demonstrable bug or serve the greater good of
173
219
the project (for example refactoring for modularisation);
174
-
-be well peer reviewed;
220
+
-Be well peer reviewed;
175
221
- follow code style guidelines;
176
222
177
223
Patches that change PIVX consensus rules are considerably more involved than
@@ -185,13 +231,16 @@ patches because of increased peer review and consensus building requirements.
185
231
186
232
Anyone may participate in peer review which is expressed by comments in the pull
187
233
request. Typically reviewers will review the code for obvious errors, as well as
188
-
test out the patch set and opine on the technical merits of the patch. Project
234
+
test out the patchset and opine on the technical merits of the patch. Project
189
235
maintainers take into account the peer review when determining if there is
190
236
consensus to merge a pull request (remember that discussions may have been
191
-
spread out over GitHub, forums, email, and Slack discussions). The following
237
+
spread out over GitHub, forums, email, and Discord discussions). The following
192
238
language is used within pull-request comments:
193
239
194
-
- ACK means "I have tested the code and I agree it should be merged";
240
+
- (t)ACK means "I have tested the code and I agree it should be merged", involving
241
+
change-specific manual testing in addition to running the unit and functional
242
+
tests, and in case it is not obvious how the manual testing was done, it should
243
+
be described;
195
244
- NACK means "I disagree this should be merged", and must be accompanied by
196
245
sound technical justification (or in certain cases of copyright/patent/licensing
197
246
issues, legal justification). NACKs without accompanying reasoning may be
@@ -209,13 +258,13 @@ that have demonstrated a deeper commitment and understanding towards the project
209
258
(over time) or have clear domain expertise may naturally have more weight, as
210
259
one would expect in all walks of life.
211
260
212
-
Where a patch set affects consensus critical code, the bar will be set much
261
+
Where a patchset affects consensus critical code, the bar will be set much
213
262
higher in terms of discussion and peer review requirements, keeping in mind that
214
263
mistakes could be very costly to the wider community. This includes refactoring
215
264
of consensus critical code.
216
265
217
-
Where a patch set proposes to change the PIVX consensus, it must have been
218
-
discussed extensively on the forums and Slack, be accompanied by a widely
266
+
Where a patchset proposes to change the PIVX consensus, it must have been
267
+
discussed extensively on the forums and Discord, be accompanied by a widely
219
268
discussed Proposal and have a generally widely perceived technical consensus of being
220
269
a worthwhile change based on the judgement of the maintainers.
221
270
@@ -237,15 +286,15 @@ about:
237
286
that personally, though! Instead, take another critical look at what you are suggesting
238
287
and see if it: changes too much, is too broad, doesn't adhere to the
239
288
[developer notes](doc/developer-notes.md), is dangerous or insecure, is messily written, etc.
240
-
Identify and address any of the issues you find. Then ask e.g. on Slack if someone could give
289
+
Identify and address any of the issues you find. Then ask e.g. on Discord if someone could give
241
290
their opinion on the concept itself.
242
291
- It may be because your code is too complex for all but a few people. And those people
243
292
may not have realized your pull request even exists. A great way to find people who
244
293
are qualified and care about the code you are touching is the
0 commit comments