Merge branch 'maint'

* maint:
  SubmittingPatches: clarify the expected commit log description
  diff format documentation: clarify --cc and -c
  rev-list-options.txt: typo fix
This commit is contained in:
Junio C Hamano 2011-03-08 21:37:23 -08:00
commit f7c6c426ca
3 changed files with 26 additions and 13 deletions

View File

@ -10,10 +10,18 @@ Checklist (and a short version for the impatient):
description (50 characters is the soft limit, see DISCUSSION
in git-commit(1)), and should skip the full stop
- the body should provide a meaningful commit message, which:
- uses the imperative, present tense: "change",
not "changed" or "changes".
- includes motivation for the change, and contrasts
its implementation with previous behaviour
. explains the problem the change tries to solve, iow, what
is wrong with the current code without the change.
. justifies the way the change solves the problem, iow, why
the result with the change is better.
. alternate solutions considered but discarded, if any.
- describe changes in imperative mood, e.g. "make xyzzy do frotz"
instead of "[This patch] makes xyzzy do frotz" or "[I] changed
xyzzy to do frotz", as if you are giving orders to the codebase
to change its behaviour.
- try to make sure your explanation can be understood without
external resources. Instead of giving a URL to a mailing list
archive, summarize the relevant points of the discussion.
- add a "Signed-off-by: Your Name <you@example.com>" line to the
commit message (or just use the option "-s" when committing)
to confirm that you agree to the Developer's Certificate of Origin
@ -90,7 +98,10 @@ your commit head. Instead, always make a commit with complete
commit message and generate a series of patches from your
repository. It is a good discipline.
Describe the technical detail of the change(s).
Give an explanation for the change(s) that is detailed enough so
that people can judge if it is good thing to do, without reading
the actual patch text to determine how well the code does what
the explanation promises to do.
If your description starts to get too long, that's a sign that you
probably need to split up your commit to finer grained pieces.
@ -99,9 +110,8 @@ help reviewers check the patch, and future maintainers understand
the code, are the most beautiful patches. Descriptions that summarise
the point in the subject well, and describe the motivation for the
change, the approach taken by the change, and if relevant how this
differs substantially from the prior version, can be found on Usenet
archives back into the late 80's. Consider it like good Netiquette,
but for code.
differs substantially from the prior version, are all good things
to have.
Oh, another thing. I am picky about whitespaces. Make sure your
changes do not trigger errors with the sample pre-commit hook shipped

View File

@ -74,10 +74,13 @@ separate lines indicate the old and the new mode.
combined diff format
--------------------
"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
'--cc' option to produce 'combined diff'. For showing a merge commit
with "git log -p", this is the default format; you can force showing
full diff with the '-m' option.
Any diff-generating command can take the `-c` or `--cc` option to
produce a 'combined diff' when showing a merge. This is the default
format when showing merges with linkgit:git-diff[1] or
linkgit:git-show[1]. Note also that you can give the `-m' option to any
of these commands to force generation of diffs with individual parents
of a merge.
A 'combined diff' format looks like this:
------------

View File

@ -165,7 +165,7 @@ limiting may be applied.
-n 'number'::
--max-count=<number>::
Limit the number of commits output.
Limit the number of commits to output.
--skip=<number>::