commit-tree: add and document --no-gpg-sign

Document how to override commit.gpgsign configuration that is set to true per "git commit" invocation (parse-options machinery lets us say "--no-gpg-sign" to do so). "git commit-tree" does not use parse-options, so manually add the corresponding option for now. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Dec 13, 2013 at 15:40 UTC 55ca3f99ae4895605a348322dd2fc50f2065f508
3 files changed +14
Documentation/git-commit-tree.txt
+5
@@ -55,8 +55,13 @@ OPTIONS
55 from the standard input.
56
57 -S[<keyid>]::
58 +--gpg-sign[=<keyid>]::
59 GPG-sign commit.
60
61 +--no-gpg-sign::
62 + Countermand `commit.gpgsign` configuration variable that is
63 + set to force each and every commit to be signed.
64 +
65
66 Commit Information
67 ------------------
Documentation/git-commit.txt
+4
@@ -302,6 +302,10 @@ configuration variable documented in linkgit:git-config[1].
302 --gpg-sign[=<keyid>]::
303 GPG-sign commit.
304
305 +--no-gpg-sign::
306 + Countermand `commit.gpgsign` configuration variable that is
307 + set to force each and every commit to be signed.
308 +
309 \--::
310 Do not interpret any more arguments as options.
311
builtin/commit-tree.c
+5
@@ -71,6 +71,11 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
71 continue;
72 }
73
74 + if (!strcmp(arg, "--no-gpg-sign")) {
75 + sign_commit = NULL;
76 + continue;
77 + }
78 +
79 if (!strcmp(arg, "-m")) {
80 if (argc <= ++i)
81 usage(commit_tree_usage);