doc: preparatory clean-up of description on the sign-off option

Almost identical text on the signed-off-by trailer appears in the documentation for "git commit" and "git merge" and its friends. Introduce a new signoff-option.txt file to be shared. A couple of things of note are: - The short-form "-s" is available only in "git commit", but not in commands that are friends of "git merge", as it is used as a short-hand for "--strategy". - The original lacks description on the negated "--no-signoff" form on "git commit" side, but it equally is applicable. It however was unclear in the original text that not adding a Signed-off-by trailer is the default, so rephrase to explain it as a way to countermand a --signoff option that appeared earlier on the same command line. This is in preparation to apply a further clarification on what exactly the Signed-off-by trailer means. Suggested-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Reviewed-by: Bradley M. Kuhn <bkuhn@sfconservancy.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Oct 19, 2020 at 18:03 UTC ae2e0ab6c544675256091a6bde5975407b0fab05
3 files changed +17 -18
Documentation/git-commit.txt
+2 -8
@@ -59,6 +59,7 @@ commit by giving the same set of parameters (options and paths).
59 If you make a commit and then find a mistake immediately after
60 that, you can recover from it with 'git reset'.
61
62 +:git-commit: 1
63
64 OPTIONS
65 -------
@@ -163,14 +164,7 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
164 message, the commit is aborted. This has no effect when a message
165 is given by other means, e.g. with the `-m` or `-F` options.
166
166 --s::
167 ---signoff::
168 - Add Signed-off-by line by the committer at the end of the commit
169 - log message. The meaning of a signoff depends on the project,
170 - but it typically certifies that committer has
171 - the rights to submit this work under the same license and
172 - agrees to a Developer Certificate of Origin
173 - (see http://developercertificate.org/ for more information).
167 +include::signoff-option.txt[]
168
169 -n::
170 --no-verify::
Documentation/merge-options.txt
+1 -10
@@ -77,16 +77,7 @@ When not possible, refuse to merge and exit with a non-zero status.
77 With --no-log do not list one-line descriptions from the
78 actual commits being merged.
79
80 ---signoff::
81 ---no-signoff::
82 - Add Signed-off-by line by the committer at the end of the commit
83 - log message. The meaning of a signoff depends on the project,
84 - but it typically certifies that committer has
85 - the rights to submit this work under the same license and
86 - agrees to a Developer Certificate of Origin
87 - (see http://developercertificate.org/ for more information).
88 -+
89 -With --no-signoff do not add a Signed-off-by line.
80 +include::signoff-option.txt[]
81
82 --stat::
83 -n::
Documentation/signoff-option.txt new
+14
@@ -0,0 +1,14 @@
1 +ifdef::git-commit[]
2 +-s::
3 +endif::git-commit[]
4 +--signoff::
5 +--no-signoff::
6 + Add Signed-off-by line by the committer at the end of the commit
7 + log message. The meaning of a signoff depends on the project,
8 + but it typically certifies that committer has
9 + the rights to submit this work under the same license and
10 + agrees to a Developer Certificate of Origin
11 + (see http://developercertificate.org/ for more information).
12 ++
13 +The --no-signoff option can be used to countermand an earlier --signoff
14 +option on the command line.