Skip to content

Commit 47afed5

Browse files
samvgitster
authored andcommitted
SubmittingPatches: itemize and reflect upon well written changes
The SubmittingPatches file was trimmed down from a somewhat overwhelming set of requirements from the Linux Kernel equivalent; however perhaps a little of it can be returned without making the text too long. Signed-off-by: Sam Vilain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62f780d commit 47afed5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Documentation/SubmittingPatches

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ Checklist (and a short version for the impatient):
66
- check for unnecessary whitespace with "git diff --check"
77
before committing
88
- do not check in commented out code or unneeded files
9-
- provide a meaningful commit message
109
- the first line of the commit message should be a short
1110
description and should skip the full stop
11+
- the body should provide a meaningful commit message, which:
12+
- uses the imperative, present tense: "change",
13+
not "changed" or "changes".
14+
- includes motivation for the change, and contrasts
15+
its implementation with previous behaviour
1216
- if you want your work included in git.git, add a
1317
"Signed-off-by: Your Name <[email protected]>" line to the
1418
commit message (or just use the option "-s" when
@@ -62,6 +66,14 @@ Describe the technical detail of the change(s).
6266

6367
If your description starts to get too long, that's a sign that you
6468
probably need to split up your commit to finer grained pieces.
69+
That being said, patches which plainly describe the things that
70+
help reviewers check the patch, and future maintainers understand
71+
the code, are the most beautiful patches. Descriptions that summarise
72+
the point in the subject well, and describe the motivation for the
73+
change, the approach taken by the change, and if relevant how this
74+
differs substantially from the prior version, can be found on Usenet
75+
archives back into the late 80's. Consider it like good Netiquette,
76+
but for code.
6577

6678
Oh, another thing. I am picky about whitespaces. Make sure your
6779
changes do not trigger errors with the sample pre-commit hook shipped

0 commit comments

Comments
 (0)