Skip to content

Commit db1cf2e

Browse files
committed
Merge branch 'rr/doc-submitting' into maint
* rr/doc-submitting: SubmittingPatches: Add new section about what to base work on
2 parents 82df0ef + d0c26f0 commit db1cf2e

1 file changed

Lines changed: 38 additions & 11 deletions

File tree

Documentation/SubmittingPatches

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,34 @@ But the patch submission requirements are a lot more relaxed
5454
here on the technical/contents front, because the core GIT is
5555
thousand times smaller ;-). So here is only the relevant bits.
5656

57+
(0) Decide what to base your work on.
58+
59+
In general, always base your work on the oldest branch that your
60+
change is relevant to.
61+
62+
- A bugfix should be based on 'maint' in general. If the bug is not
63+
present in 'maint', base it on 'master'. For a bug that's not yet
64+
in 'master', find the topic that introduces the regression, and
65+
base your work on the tip of the topic.
66+
67+
- A new feature should be based on 'master' in general. If the new
68+
feature depends on a topic that is in 'pu', but not in 'master',
69+
base your work on the tip of that topic.
70+
71+
- Corrections and enhancements to a topic not yet in 'master' should
72+
be based on the tip of that topic. If the topic has not been merged
73+
to 'next', it's alright to add a note to squash minor corrections
74+
into the series.
75+
76+
- In the exceptional case that a new feature depends on several topics
77+
not in 'master', start working on 'next' or 'pu' privately and send
78+
out patches for discussion. Before the final merge, you may have to
79+
wait until some of the dependent topics graduate to 'master', and
80+
rebase your work.
81+
82+
To find the tip of a topic branch, run "git log --first-parent
83+
master..pu" and look for the merge commit. The second parent of this
84+
commit is the tip of the topic branch.
5785

5886
(1) Make separate commits for logically separate changes.
5987

@@ -171,17 +199,16 @@ patch, format it as "multipart/signed", not a text/plain message
171199
that starts with '-----BEGIN PGP SIGNED MESSAGE-----'. That is
172200
not a text/plain, it's something else.
173201

174-
Note that your maintainer does not necessarily read everything
175-
on the git mailing list. If your patch is for discussion first,
176-
send it "To:" the mailing list, and optionally "cc:" him. If it
177-
is trivially correct or after the list reached a consensus, send
178-
it "To:" the maintainer and optionally "cc:" the list for
179-
inclusion.
180-
181-
Also note that your maintainer does not actively involve himself in
182-
maintaining what are in contrib/ hierarchy. When you send fixes and
183-
enhancements to them, do not forget to "cc: " the person who primarily
184-
worked on that hierarchy in contrib/.
202+
Unless your patch is a very trivial and an obviously correct one,
203+
first send it with "To:" set to the mailing list, with "cc:" listing
204+
people who are involved in the area you are touching (the output from
205+
"git blame $path" and "git shortlog --no-merges $path" would help to
206+
identify them), to solicit comments and reviews. After the list
207+
reached a consensus that it is a good idea to apply the patch, re-send
208+
it with "To:" set to the maintainer and optionally "cc:" the list for
209+
inclusion. Do not forget to add trailers such as "Acked-by:",
210+
"Reviewed-by:" and "Tested-by:" after your "Signed-off-by:" line as
211+
necessary.
185212

186213

187214
(4) Sign your work

0 commit comments

Comments
 (0)