git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, jrnieder@gmail.com, jalopezsilva@gmail.com
Subject: Re: [RFC PATCH] credential: minor documentation fixes
Date: Mon, 4 May 2020 08:58:37 -0700	[thread overview]
Message-ID: <20200504155837.GD86805@Carlos-MBP> (raw)
In-Reply-To: <20200504144436.GA9893@coredump.intra.peff.net>

On Mon, May 04, 2020 at 10:44:36AM -0400, Jeff King wrote:
> On Mon, May 04, 2020 at 12:45:20AM -0700, Carlo Marcelo Arenas Belón wrote:
> > * clarification on which fields can be updated by the helper; currently I
> >   don't think we allow overrides for protocol and host and assume all others
> >   but the documentation doesn't clarify, and that might be a problem for
> >   cert:// where file is more relevant.
> 
> I think we do allow a helper to transform a credential in any way:
> 
>   echo url=https://example.com/ |
>   git \
>     -c credential.helper='!sed >&2 s/^/one:/; echo host=other.example.com;:' \
>     -c credential.helper='!sed >&2 s/^/two:/;:' \
>     credential fill
> 
> produces:
> 
>   one:protocol=https
>   one:host=example.com
>   two:protocol=https
>   two:host=other.example.com
>   Username for 'https://other.example.com': 
> 
> So after the first helper runs, subsequent helpers (and the internal
> terminal prompt) will consider the modified hostname.

correct, and that is because the specification (and the current code) does
say that is a valid operation.

what I meant is that we don't REALLY allow those modification to take place
since the credential helper suggestions can't really affect what git assumes
is the right host or protocol (or FWIW path), unlike username/password  and
so they don't seem worth having IMHO.

> Now whether that's a sane feature or not, I'm not sure.

would restricting the output of the credential helpers to username and
password make more sense in this context then?

obviously this change will required both the protocol (definition and
implementation) to change an changes on ALL helpers but I thought that was
the objective of that documentation suggestion in Jonathan's original email.

I agree though the discussion of if that is something we should do in a
maintenance release or not, is worth having; but I suspect it could be
implemented with reasonable enough backward compatibility to be considered.

Carlo

CC adding the author of cert:// too easy on that part of the discussion

  parent reply	other threads:[~2020-05-04 15:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03  6:34 [RFC PATCH] credential: minor documentation fixes Carlo Marcelo Arenas Belón
2020-05-03  6:58 ` Jeff King
2020-05-04  7:45   ` Carlo Marcelo Arenas Belón
2020-05-04 14:44     ` Jeff King
2020-05-04 15:39       ` Carlo Marcelo Arenas Belón
2020-05-04 16:10         ` Jeff King
2020-05-04 15:58       ` Carlo Marcelo Arenas Belón [this message]
2020-05-04 16:13         ` Jeff King
2020-05-05  1:39 ` [PATCH 0/4] credential: documentation updates for maint Carlo Marcelo Arenas Belón
2020-05-05  1:39   ` [PATCH 1/4] credential: update description for credential_from_url_gently Carlo Marcelo Arenas Belón
2020-05-05  1:39   ` [PATCH 2/4] credential: correct order of parameters for credential_match Carlo Marcelo Arenas Belón
2020-05-05  1:39   ` [PATCH 3/4] credential: update gitcredentials documentation Carlo Marcelo Arenas Belón
2020-05-06 16:21     ` Jeff King
2020-05-05  1:39   ` [PATCH 4/4] credential: document protocol updates Carlo Marcelo Arenas Belón
2020-05-06 16:26     ` Jeff King
2020-05-06 16:27   ` [PATCH 0/4] credential: documentation updates for maint Jeff King
2020-05-06 23:28     ` Carlo Marcelo Arenas Belón
2020-05-07 20:59       ` Jeff King
2020-05-07 21:23         ` Carlo Marcelo Arenas Belón
2020-05-07 22:17           ` Jeff King
2020-05-07 23:35             ` Carlo Marcelo Arenas Belón
2020-05-06 21:47   ` [PATCH v2 " Carlo Marcelo Arenas Belón
2020-05-06 21:47     ` [PATCH v2 1/4] credential: update description for credential_from_url_gently Carlo Marcelo Arenas Belón
2020-05-06 21:47     ` [PATCH v2 2/4] credential: correct order of parameters for credential_match Carlo Marcelo Arenas Belón
2020-05-06 21:47     ` [PATCH v2 3/4] credential: update gitcredentials documentation Carlo Marcelo Arenas Belón
2020-05-07 20:54       ` Jeff King
2020-05-07 21:02         ` Junio C Hamano
2020-05-06 21:47     ` [PATCH v2 4/4] credential: document protocol updates Carlo Marcelo Arenas Belón
2020-05-07 20:57       ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200504155837.GD86805@Carlos-MBP \
    --to=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jalopezsilva@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).