From: Jeff King <peff@peff.net>
To: Nicolas Mailhot <nicolas.mailhot@laposte.net>
Cc: git <git@vger.kernel.org>
Subject: Re: [RFE] Please add name and email to git credentials
Date: Fri, 2 Nov 2018 12:51:10 -0400 [thread overview]
Message-ID: <20181102165110.GA11212@sigill.intra.peff.net> (raw)
In-Reply-To: <1e3901b9a75a043d9c31d66d98410f3288a7c5be.camel@laposte.net>
On Fri, Nov 02, 2018 at 09:57:30AM +0100, Nicolas Mailhot wrote:
> Or are you arguing that having two separate mecanisms in git, to match
> config directives to repo urls, is some kind of improvement?
There are already are multiple mechanisms (e.g., http.* config). So that
ship has sailed. ;)
> I didn't create or write or specify the way git credential matches repo
> urls. It already exists within git. If you have a problem with the
> matching logic git credential uses, why are you arguing with me instead
> of taking it up with the maintainers of this logic?
I did create the way git credential matches repo urls. And I do not
think your proposal is a good idea. The credential system is about
interacting with a remote URL, and creating a commit object is a local
operation. That mismatch leaks through when you work with multiple
remotes, since it is not clear which URL we would match against when the
operation does not involve a remote at all.
If you want to have per-repo name/email for creating commits, right now
your option is to have conditional config based on the local filesystem
path.
Elsewhere in this thread[1] Ævar suggested having conditional config
directives based on the presence of a remote. I'm a little hesitant
there because it requires the config parsing to depend on the value of
another key (introducing subtle timing dependencies). But aside from
bizarre corner cases (e.g., including config for remote.* via a
conditional include on the remote.* config), I think it would do what
you want and would be generally useful.
That seems like a more fruitful direction to me.
-Peff
[1] https://public-inbox.org/git/87wopxj5wr.fsf@evledraar.gmail.com/
next prev parent reply other threads:[~2018-11-02 16:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 9:59 [RFE] Please add name and email to git credentials Nicolas Mailhot
2018-11-01 11:22 ` Ævar Arnfjörð Bjarmason
2018-11-01 12:34 ` Nicolas Mailhot
2018-11-01 13:15 ` Ævar Arnfjörð Bjarmason
2018-11-01 14:13 ` Christian Couder
2018-11-01 14:32 ` Randall S. Becker
2018-11-01 14:42 ` Nicolas Mailhot
2018-11-02 8:27 ` Christian Couder
2018-11-02 8:57 ` Nicolas Mailhot
2018-11-02 16:51 ` Jeff King [this message]
2018-11-02 17:32 ` Nicolas Mailhot
2018-11-02 17:56 ` Jeff King
2018-11-01 11:32 ` Nicolas Mailhot
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=20181102165110.GA11212@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=nicolas.mailhot@laposte.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 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).