git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Dec 2013, #03; Thu, 12)

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2013, 05:34 UTC
Message-ID
<xmqqa9g1qrzj.fsf@gitster.dls.corp.google.com>
In-Reply-To
<xmqqwqj9r2ig.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> [Stalled]
>
> * nv/commit-gpgsign-config (2013-11-06) 1 commit
>  - Add the commit.gpgsign option to sign all commits
>
>  Introduce commit.gpgsign configuration variable to force every
>  commit to be GPG signed.
>
>  Needs tests, perhaps?

Besides, we would need at least something like this to make sure that people have a way to selectively disable configured default when necessary, perhaps like this.

-- >8 --
Subject: [PATCH] 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>
---
 Documentation/git-commit-tree.txt | 5 +++++
 Documentation/git-commit.txt      | 4 ++++
 builtin/commit-tree.c             | 5 +++++
 3 files changed, 14 insertions(+)
diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
index cafdc96..a469eab 100644
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -55,8 +55,13 @@ OPTIONS
 	from the standard input.
 
 -S[<keyid>]::
+--gpg-sign[=<keyid>]::
 	GPG-sign commit.
 
+--no-gpg-sign::
+	Countermand `commit.gpgsign` configuration variable that is
+	set to force each and every commit to be signed.
+
 
 Commit Information
 ------------------
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 1a7616c..7c42e9c 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -302,6 +302,10 @@ configuration variable documented in linkgit:git-config[1].
 --gpg-sign[=<keyid>]::
 	GPG-sign commit.
 
+--no-gpg-sign::
+	Countermand `commit.gpgsign` configuration variable that is
+	set to force each and every commit to be signed.
+
 \--::
 	Do not interpret any more arguments as options.
 
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index 1646d5b..4bf852d 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -71,6 +71,11 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
 			continue;
 		}
 
+		if (!strcmp(arg, "--no-gpgsign")) {
+			sign_commit = NULL;
+			continue;
+		}
+
 		if (!strcmp(arg, "-m")) {
 			if (argc <= ++i)
 				usage(commit_tree_usage);
-- 
1.8.5.1-272-g523f7c4
Previous: Junio C HamanoNext: Nicolas Vigier
Message 6 of 11 in “What's cooking in git.git (Dec 2013, #03; Thu, 12)”
  1. Junio C HamanoDec 13, 2013
  2. Duy NguyenDec 13, 2013
  3. Junio C HamanoDec 13, 2013
  4. Torsten BögershausenDec 13, 2013
  5. Junio C HamanoDec 13, 2013
  6. Junio C HamanoDec 16, 2013
  7. Nicolas VigierDec 16, 2013
  8. Junio C HamanoDec 16, 2013
  9. test the commit.gpgsign config optionNicolas Vigier, Dec 16, 2013
  10. Junio C HamanoDec 16, 2013
  11. Junio C HamanoDec 17, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.