Re: [PATCH v2 1/9] cherry-pick, revert: add the --gpg-sign option

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 1/9] cherry-pick, revert: add the --gpg-sign option

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:44

"brian m. carlson" [off-list ref] writes:
+-S[<keyid>]::
+--gpg-sign[=<keyid>]::
+	GPG-sign commits.
+
Does this accept --no-gpg-sign?  If not, shouldn't it?
quoted hunk
diff --git a/sequencer.c b/sequencer.c
index 90cac7b..bde5f04 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -392,11 +392,18 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
 {
 	struct argv_array array;
 	int rc;
+	char *gpg_sign;
 
 	argv_array_init(&array);
 	argv_array_push(&array, "commit");
 	argv_array_push(&array, "-n");
 
+	if (opts->gpg_sign) {
+		gpg_sign = xmalloc(3 + strlen(opts->gpg_sign));
+		sprintf(gpg_sign, "-S%s", opts->gpg_sign);
+		argv_array_push(&array, gpg_sign);
+		free(gpg_sign);
+	}
Here you would need to invent a new way to propagate --no-gpg-sign
to subsequent invocations, I think.

Re: [PATCH v2 1/9] cherry-pick, revert: add the --gpg-sign option

From: brian m. carlson <hidden>
Date: 2016-06-15 22:59:44

On Fri, Jan 24, 2014 at 01:00:06PM -0800, Junio C Hamano wrote:
"brian m. carlson" [off-list ref] writes:
quoted
+-S[<keyid>]::
+--gpg-sign[=<keyid>]::
+	GPG-sign commits.
+
Does this accept --no-gpg-sign?  If not, shouldn't it?
It does not.  I took Nicolas's patches from the list and applied them to
master, so nothing from next is there, including the commit.gpgsign
stuff.

Would you prefer I rebased them on next instead?
quoted
diff --git a/sequencer.c b/sequencer.c
index 90cac7b..bde5f04 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -392,11 +392,18 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
 {
 	struct argv_array array;
 	int rc;
+	char *gpg_sign;
 
 	argv_array_init(&array);
 	argv_array_push(&array, "commit");
 	argv_array_push(&array, "-n");
 
+	if (opts->gpg_sign) {
+		gpg_sign = xmalloc(3 + strlen(opts->gpg_sign));
+		sprintf(gpg_sign, "-S%s", opts->gpg_sign);
+		argv_array_push(&array, gpg_sign);
+		free(gpg_sign);
+	}
Here you would need to invent a new way to propagate --no-gpg-sign
to subsequent invocations, I think.
Probably.  It wouldn't be too terribly difficult.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help