All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Gerrit Pape <pape@smarden.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] git-tag: don't use gpg's stdin, stdout when signing tags
Date: Fri, 20 Feb 2009 18:56:58 +0100	[thread overview]
Message-ID: <499EEEEA.2040600@kdbg.org> (raw)
In-Reply-To: <20090220113856.6612.qmail@0bbdb5719a4668.315fe32.mid.smarden.org>

Gerrit Pape schrieb:
>  	memset(&gpg, 0, sizeof(gpg));
>  	gpg.argv = args;
> -	gpg.in = -1;
> -	gpg.out = -1;
> +	gpg.in = 0;
> +	gpg.out = 1;

I assume you mean with this that gpg should read from fd 0 and write to 
fd 1, IOW, it should use the standard channels. If I am right, then the 
memset above has initialized gpg as needed already. Then gpg.argv is the 
only thing you are setting up in struct child_process gpg; but in this 
case you can use a convenience function...

>  	args[0] = "gpg";
>  	args[1] = "-bsau";
>  	args[2] = signingkey;
> -	args[3] = NULL;
...
> +	args[3] = "-o";
> +	args[4] = signpath;
> +	args[5] = unsignpath;
> +	args[6] = NULL;
...
> +	if (run_command(&gpg)) {

... here (note: no struct child_process needed):

	if (run_command_v_opt(args, 0)) {

(Just in case this patch is required...)

-- Hannes

      parent reply	other threads:[~2009-02-20 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 11:38 [PATCH] git-tag: don't use gpg's stdin, stdout when signing tags Gerrit Pape
2009-02-20 13:46 ` Todd Zullinger
2009-02-23 15:23   ` Gerrit Pape
2009-02-20 17:56 ` Johannes Sixt [this message]

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=499EEEEA.2040600@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pape@smarden.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.