Re: Would it make sense to add a commit.signOff config?
From: Elijah Newren <hidden>
Date: 2025-12-16 00:17:33
On Sun, Dec 14, 2025 at 6:00 PM Junio C Hamano [off-list ref] wrote:
quoted hunk ↗ jump to hunk
"brian m. carlson" [off-list ref] writes:quoted
I think this would be a fine approach or we could add an entry in the Git FAQ (or both). I agree that this is something that comes up frequently and writing it down in a more visible way would be kinder to users and mailing list participants.Something like this, then? ---- >8 ---- Subject: [PATCH] document that foo.signoff will not be added Every now and then we see this coming up on the list. Let's help new contributors who are not aware of past discussions by clearly documenting our past consensus. Helped-by: brian m. carlson [off-list ref] Signed-off-by: Junio C Hamano <redacted> --- Documentation/gitfaq.adoc | 15 +++++++++++++++ Documentation/signoff-option.adoc | 12 ++++++++++++ 2 files changed, 27 insertions(+)diff --git c/Documentation/gitfaq.adoc w/Documentation/gitfaq.adoc index f2917d142c..656093047a 100644 --- c/Documentation/gitfaq.adoc +++ w/Documentation/gitfaq.adoc@@ -83,6 +83,21 @@ Windows would be the configuration `"C:\Program Files\Vim\gvim.exe" --nofork`, which quotes the filename with spaces and specifies the `--nofork` option to avoid backgrounding the process. +[[sign-off]] +Why not have `commit.signoff` and other configuration variables?:: + As it makes it harder to argue against one who tells the court + "the log message of the commit ends with a Signed-off-by + trailer by person X, but it is very plausible that it was done + by inertia without person X really intending to certify what + DCO says, hence the Signed-off-by trailer is meaningless", if + we add more publicized ways to add sign-off automatically, Git + does not (and will not) have a configuration variable to + enable the `--signoff` command line option it by default.
This feels kind of hard to parse for me. Maybe it's just the lack of sentence breaks, particularly near the end. Let me take a stab at an alternative: Git intentionally does not (and will not) provide a configuration variable, such as `commit.signoff`, to automatically add `--signoff` by default. The reason is to protect the legal and intentional significance of a sign-off. If there were more automated and widely publicized ways for sign-offs to be appended, it would become easier for someone to argue later that a "Signed-off-by" trailer was just added out of habit or by automation, without the committer's full awareness or intent to certify their agreement with the Developer Certificate of Origin (DCO) or a similar statement. This would weaken the sign-off’s value and could undermine its credibility in legal or contractual situations. To uphold the integrity of a sign-off, Git only adds it when explicitly requested, rather than through automatic configuration settings. Maybe the last sentence or two are a bit redundant and could be stricken. Anyway, thoughts?
quoted hunk ↗ jump to hunk
++ +There exists `format.signoff`, but that is a historical mistake, and +it is not an excuse to pile on more mistakes of the same kind on top. + + Credentials -----------diff --git c/Documentation/signoff-option.adoc w/Documentation/signoff-option.adoc index cddfb225d1..0b869dfbe4 100644 --- c/Documentation/signoff-option.adoc +++ w/Documentation/signoff-option.adoc@@ -16,3 +16,15 @@ endif::git-commit[] + The `--no-signoff` option can be used to countermand an earlier `--signoff` option on the command line. ++ +As it makes it harder to argue against one who tells the court "the +log message of the commit ends with a Signed-off-by trailer by person +X, but it is very plausible that it was done by inertia without person +X really intending to certify what DCO says, hence the Signed-off-by +trailer is meaningless", if we add more publicized ways to add +sign-off automatically, Git does not (and will not) have a +configuration variable to enable the `--signoff` command line option +it by default. ++ +There exists `format.signoff`, but that is a historical mistake, and +it is not an excuse to pile on more mistakes of the same kind on top.
This feels like it's missing context (it'll take the reader a while to figure out why the paragraphs are there and that the two are related), and isn't as helpful to someone just trying to understand which command line flags exist and what they do. Maybe combine the two new paragraphs? Or, perhaps just a shorter version that just refers to the FAQ? The latter might be something like: Git does not (and will not) have a configuration variable to enable the `--signoff` command line option by default; see the `commit.signoff` entry in the gitfaq for more details. (`format.signoff`, is an exception, but it was a historical mistake, not an excuse to pile on more mistakes.)