From: Nicolas Vigier <boklm@mars-attacks.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (Dec 2013, #03; Thu, 12)
Date: Mon, 16 Dec 2013 13:30:40 +0100 [thread overview]
Message-ID: <20131216123040.GZ11745@mars-attacks.org> (raw)
In-Reply-To: <xmqqa9g1qrzj.fsf@gitster.dls.corp.google.com>
On Sun, 15 Dec 2013, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > [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?
Ok, I'll add some tests.
>
> 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.
This looks like a good idea.
>
> -- >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.
Looking at the code, commit-tree does not currently support the
"--gpg-sign=" option, only the short one -S.
If we want to add it for consistency with the --no-gpg-sign option, it
can be added with this change :
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index 1646d5b25e4f..b380d486c89a 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 (!memcmp(arg, "--gpg-sign=", 11)) {
+ sign_commit = arg + 11;
+ continue;
+ }
+
if (!strcmp(arg, "-m")) {
if (argc <= ++i)
usage(commit_tree_usage);
next prev parent reply other threads:[~2013-12-16 12:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 0:57 What's cooking in git.git (Dec 2013, #03; Thu, 12) Junio C Hamano
2013-12-13 1:05 ` Duy Nguyen
2013-12-13 20:58 ` Junio C Hamano
2013-12-13 7:39 ` Torsten Bögershausen
2013-12-13 20:58 ` Junio C Hamano
2013-12-16 5:34 ` Junio C Hamano
2013-12-16 12:30 ` Nicolas Vigier [this message]
2013-12-16 17:14 ` Junio C Hamano
2013-12-16 13:55 ` [PATCH] test the commit.gpgsign config option Nicolas Vigier
2013-12-16 17:05 ` Junio C Hamano
2013-12-17 23:27 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131216123040.GZ11745@mars-attacks.org \
--to=boklm@mars-attacks.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).