All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 2/2] prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts
Date: Fri, 5 Dec 2014 04:10:49 -0500	[thread overview]
Message-ID: <20141205091049.GB32112@peff.net> (raw)
In-Reply-To: <xmqqbnnjrtfi.fsf@gitster.dls.corp.google.com>

On Thu, Dec 04, 2014 at 01:33:53PM -0800, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > On Thu, Dec 04, 2014 at 10:24:09AM -0800, Junio C Hamano wrote:
> >
> >> I wish this covered a lot more than just this part from an
> >> end-user's point of view, but this is definitely one of the most
> >> important code paths the mechanism should cover.
> >
> > Which parts do you mean? Stuff like "git add -i"?
> 
> No, more like "tag -s" that eventually leads to somebody prompting
> for the passphrase to unlock your GPG key---and from an end user's
> point of view, that somebody is Git.

Ah, yeah, I definitely agree that GIT_TERMINAL_PROMPT should work there,
too.

> Of course, from _our_ point of view, that somebody is not us.  We do
> not have direct control, certainly from this codepath.

Right, but in theory we can provoke gpg to do what we want when we spawn
it. However, having had zero luck in convincing it to stop asking me for
a passphrase recently in another thread, I do not know what magic
command line option is required. :(

I think it would be OK to merge the git handling of GIT_TERMINAL_PROMPT
(i.e., the patch I sent), and somebody who runs into the issue with gpg
and can figure out how to tame it can scratch their own itch later. I
hate leaving things half-implemented or inconsistent, but I also don't
know how to make gpg do what we want. And doing a partial solution
seems better to me than holding the credential.c half hostage.

-Peff

  reply	other threads:[~2014-12-05  9:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  0:03 Disabling credential helper? brian m. carlson
2014-12-03  0:59 ` Jonathan Nieder
2014-12-03  1:21   ` Jeff King
2014-12-03  1:29     ` Jonathan Nieder
2014-12-03  1:36       ` Jeff King
2014-12-04  1:33         ` Jeff King
2014-12-04  6:07           ` Junio C Hamano
2014-12-03 17:14     ` Junio C Hamano
2014-12-04  0:42     ` brian m. carlson
2014-12-04  3:42       ` [PATCH 0/2] disabling terminal prompts Jeff King
2014-12-04  3:46         ` [PATCH 1/2] credential: let helpers tell us to quit Jeff King
2014-12-04  3:52         ` [PATCH 2/2] prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts Jeff King
2014-12-04 18:24           ` Junio C Hamano
2014-12-04 21:01             ` Jeff King
2014-12-04 21:33               ` Junio C Hamano
2014-12-05  9:10                 ` Jeff King [this message]
2014-12-05 17:37                   ` 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=20141205091049.GB32112@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    /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.