From: "Simão Afonso" <simao.afonso@powertools-tech.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Credential Store: Don't acquire lock when only reading the file
Date: Fri, 30 Oct 2020 11:22:29 +0000 [thread overview]
Message-ID: <20201030112229.3rcyylkuyrlrhn7g@safonso-t430> (raw)
In-Reply-To: <20201030055541.GA3264588@coredump.intra.peff.net>
Hi Jeff, thanks for the fast reply.
On 2020-10-30 01:55:41, Jeff King wrote:
> I agree that "get" should not be taking a lock. And looking at the code,
> I don't think that it is.
>
> However, after successfully using a password, Git will then trigger each
> helper with a "store" command. So likely what you are seeing is each
> fetch telling credential-store to store the successful password.
Ah, the plot thickens. That sounds more like it.
On 2020-10-30 01:55:41, Jeff King wrote:
> There are a few options here:
>
> - we could have Git not do that. And indeed, I wrote a patch for that
> long ago:
>
> https://lore.kernel.org/git/20120407033417.GA13914@sigill.intra.peff.net/
>
> but it turns out that some people rely on it. There were some
> options discussed there for moving it forward, but nothing ever
> happened.
>
> Another option that we didn't discuss there: we could remember which
> helper gave us the credential and not feed it back to itself. That
> would let simple cases work without the extra request, but would let
> more complex ones (feeding the result of one helper to another)
> continue to work the same.
Right, I did not imagine you could chain credential helpers, but that
makes sense.
On 2020-10-30 01:55:41, Jeff King wrote:
> Interested in trying a patch for any of those?
Sounds good to me, I should be able to handle it if you CC/BCC me
(subscribing to the firehose is a bit too much).
For reference, I'm using:
> $ git --version
> git version 2.29.1
next prev parent reply other threads:[~2020-10-30 11:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 19:20 Credential Store: Don't acquire lock when only reading the file Simão Afonso
2020-10-30 5:55 ` Jeff King
2020-10-30 11:22 ` Simão Afonso [this message]
2020-10-30 11:25 ` Jeff King
2020-10-30 11:39 ` Simão Afonso
2020-10-30 12:05 ` Simão Afonso
2020-10-30 15:01 ` 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=20201030112229.3rcyylkuyrlrhn7g@safonso-t430 \
--to=simao.afonso@powertools-tech.com \
--cc=git@vger.kernel.org \
--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).