Skip to content

Commit 55ca3f9

Browse files
committed
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 <[email protected]>
1 parent d95bfb1 commit 55ca3f9

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Documentation/git-commit-tree.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,13 @@ OPTIONS
5555
from the standard input.
5656

5757
-S[<keyid>]::
58+
--gpg-sign[=<keyid>]::
5859
GPG-sign commit.
5960

61+
--no-gpg-sign::
62+
Countermand `commit.gpgsign` configuration variable that is
63+
set to force each and every commit to be signed.
64+
6065

6166
Commit Information
6267
------------------

Documentation/git-commit.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ configuration variable documented in linkgit:git-config[1].
302302
--gpg-sign[=<keyid>]::
303303
GPG-sign commit.
304304

305+
--no-gpg-sign::
306+
Countermand `commit.gpgsign` configuration variable that is
307+
set to force each and every commit to be signed.
308+
305309
\--::
306310
Do not interpret any more arguments as options.
307311

builtin/commit-tree.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
7171
continue;
7272
}
7373

74+
if (!strcmp(arg, "--no-gpg-sign")) {
75+
sign_commit = NULL;
76+
continue;
77+
}
78+
7479
if (!strcmp(arg, "-m")) {
7580
if (argc <= ++i)
7681
usage(commit_tree_usage);

0 commit comments

Comments
 (0)