]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: preparatory clean-up of description on the sign-off option
authorJunio C Hamano <gitster@pobox.com>
Tue, 20 Oct 2020 01:03:52 +0000 (18:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Oct 2020 18:57:35 +0000 (11:57 -0700)
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>
Documentation/git-commit.txt
Documentation/merge-options.txt
Documentation/signoff-option.txt [new file with mode: 0644]

index a3baea32aedddfa00077adc5f2a2b36e38a5ea26..17150fa7eabe8092acf09f63220b515a0002a7b4 100644 (file)
@@ -59,6 +59,7 @@ commit by giving the same set of parameters (options and paths).
 If you make a commit and then find a mistake immediately after
 that, you can recover from it with 'git reset'.
 
+:git-commit: 1
 
 OPTIONS
 -------
@@ -163,14 +164,7 @@ The `-m` option is mutually exclusive with `-c`, `-C`, and `-F`.
        message, the commit is aborted.  This has no effect when a message
        is given by other means, e.g. with the `-m` or `-F` options.
 
--s::
---signoff::
-       Add Signed-off-by line by the committer at the end of the commit
-       log message.  The meaning of a signoff depends on the project,
-       but it typically certifies that committer has
-       the rights to submit this work under the same license and
-       agrees to a Developer Certificate of Origin
-       (see http://developercertificate.org/ for more information).
+include::signoff-option.txt[]
 
 -n::
 --no-verify::
index 80d4831662c5e5fee9cdcc37e14929ce94f9b81a..eb0aabd396ff924ea30dc6f81bc1382a061a0b3d 100644 (file)
@@ -77,16 +77,7 @@ When not possible, refuse to merge and exit with a non-zero status.
 With --no-log do not list one-line descriptions from the
 actual commits being merged.
 
---signoff::
---no-signoff::
-       Add Signed-off-by line by the committer at the end of the commit
-       log message.  The meaning of a signoff depends on the project,
-       but it typically certifies that committer has
-       the rights to submit this work under the same license and
-       agrees to a Developer Certificate of Origin
-       (see http://developercertificate.org/ for more information).
-+
-With --no-signoff do not add a Signed-off-by line.
+include::signoff-option.txt[]
 
 --stat::
 -n::
diff --git a/Documentation/signoff-option.txt b/Documentation/signoff-option.txt
new file mode 100644 (file)
index 0000000..d1c6713
--- /dev/null
@@ -0,0 +1,14 @@
+ifdef::git-commit[]
+-s::
+endif::git-commit[]
+--signoff::
+--no-signoff::
+       Add Signed-off-by line by the committer at the end of the commit
+       log message.  The meaning of a signoff depends on the project,
+       but it typically certifies that committer has
+       the rights to submit this work under the same license and
+       agrees to a Developer Certificate of Origin
+       (see http://developercertificate.org/ for more information).
++
+The --no-signoff option can be used to countermand an earlier --signoff
+option on the command line.