{"thread":{"id":"22191","subject":"[PATCH] Add 'git commit --no-signoff' option.","startedAt":"2010-01-13T03:36:54Z","lastAt":"2010-01-13T03:36:54Z","messageCount":1,"participants":["Steven Drake"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"131416","messageId":"alpine.LNX.2.00.1001131636460.16395@vqena.qenxr.bet.am","threadId":"22191","inReplyTo":null,"subject":"[PATCH] Add 'git commit --no-signoff' option.","fromName":"Steven Drake","fromEmail":"sdrake@xnet.co.nz","sentAt":"2010-01-13T03:36:54Z","receivedAt":"2010-01-13T03:36:54Z","isPatch":true,"sender":{"key":"sdrake@xnet.co.nz","avatar":null},"body":"Do not add a signed-off-by line. This overrides both the `--signoff`\noption and the `commit.signoff` configuration variable.\n\nSigned-off-by: Steven Drake <sdrake@xnet.co.nz>\n---\n Documentation/git-commit.txt |    4 ++++\n builtin-commit.c             |    5 ++++-\n 2 files changed, 8 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex 5a977b6..2dfc989 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -116,6 +116,10 @@ OPTIONS\n \tAdd Signed-off-by line by the committer at the end of the commit\n \tlog message. This overrides the `commit.signoff` configuration variable.\n \n+--no-signoff::\n+\tDo not add igned-off-by line. This overrides both the `--signoff`\n+\toption and the `commit.signoff` configuration variable.\n+\n -n::\n --no-verify::\n \tThis option bypasses the pre-commit and commit-msg hooks.\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex db90e7a..f236068 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -51,7 +51,7 @@ static const char *logfile, *force_author;\n static const char *template_file;\n static char *edit_message, *use_message;\n static char *author_name, *author_email, *author_date;\n-static int all, edit_flag, also, interactive, only, amend, signoff;\n+static int all, edit_flag, also, interactive, only, amend, signoff, no_signoff;\n static int quiet, verbose, no_verify, allow_empty, dry_run, renew_authorship;\n static char *untracked_files_arg;\n /*\n@@ -103,6 +103,7 @@ static struct option builtin_commit_options[] = {\n \tOPT_STRING('C', \"reuse-message\", &use_message, \"COMMIT\", \"reuse message from specified commit\"),\n \tOPT_BOOLEAN(0, \"reset-author\", &renew_authorship, \"the commit is authored by me now (used with -C-c/--amend)\"),\n \tOPT_BOOLEAN('s', \"signoff\", &signoff, \"add Signed-off-by:\"),\n+\tOPT_BOOLEAN(0, \"no-signoff\", &no_signoff, \"Do not add Signed-off-by:\"),\n \tOPT_FILENAME('t', \"template\", &template_file, \"use specified template file\"),\n \tOPT_BOOLEAN('e', \"edit\", &edit_flag, \"force edit of commit\"),\n \tOPT_STRING(0, \"cleanup\", &cleanup_arg, \"default\", \"how to strip spaces and #comments from message\"),\n@@ -797,6 +798,8 @@ static int parse_and_validate_options(int argc, const char *argv[],\n \tif (force_author && renew_authorship)\n \t\tdie(\"Using both --reset-author and --author does not make sense\");\n \n+\tsignoff = no_signoff ? 0 : signoff;\n+\n \tif (logfile || message.len || use_message)\n \t\tuse_editor = 0;\n \tif (edit_flag)\n-- \n1.6.4\n"}]}