threads / patch / 19040

patchDocument --no-signoff option of git commit

Subject: [PATCH] Document --no-signoff option of git commit

## tl;dr

One message between Apr 24, 2009 and Apr 24, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Michael J Gruber· Apr 24, 2009, 08:31 UTC · lore

--no-signoff can be used to override --signoff and -s. This is useful for overriding options set in git aliases.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Patch is against 09cff06 (Documentation: Clarify '--signoff' for git-commit, 2008-10-19).

It is "obvious" that one can override boolean options by prepending "no-" for all commands which use the appropriate option parser. But I don't think it's obvious to most users.

On the other hand, having an alias like ci="commit -s" is useful and appropriate depending on a project's policy and a user's discipline. But still one may want to do a few commits without s-o-b. E.g., merge commits (without conflicts) don't get s-o-b lines, but amending them would add a s-o-b line with teh above alias.

Maybe there is a better place to discuss general option parsing? But it's not the same for all commands yet, I think.

Michael
 Documentation/git-commit.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to Documentation/git-commit.txt +1 −1
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index b5d81be..ef20ba6 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -96,7 +96,7 @@ OPTIONS
 -s::
 --signoff::
 	Add Signed-off-by line by the committer at the end of the commit
-	log message.
+	log message. This can be overriden with `--no-signoff`.
 
 -n::
 --no-verify::
-- 
1.6.3.rc1.51.gea0b7

← back to recent threads