From: "M Hickford via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>,
Matthew John Cheetham <mjcheetham@outlook.com>,
M Hickford <mirth.hickford@gmail.com>
Subject: [PATCH v2 0/2] credential: improvements to erase in helpers
Date: Wed, 14 Jun 2023 21:40:36 +0000 [thread overview]
Message-ID: <pull.1525.v2.git.git.1686778838.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1525.git.git.1686741785.gitgitgadget@gmail.com>
M Hickford (2):
credential: avoid erasing distinct password
credential: erase all matching credentials
Documentation/git-credential.txt | 4 +-
Documentation/gitcredentials.txt | 2 +-
builtin/credential-cache--daemon.c | 11 ++++--
builtin/credential-store.c | 21 ++++++-----
credential.c | 11 +++---
credential.h | 2 +-
t/lib-credential.sh | 59 ++++++++++++++++++++++++++++++
7 files changed, 88 insertions(+), 22 deletions(-)
base-commit: fe86abd7511a9a6862d5706c6fa1d9b57a63ba09
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1525%2Fhickford%2Ferase-test-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1525/hickford/erase-test-v2
Pull-Request: https://github.com/git/git/pull/1525
Range-diff vs v1:
1: 35ee1795bcd = 1: 35ee1795bcd credential: avoid erasing distinct password
2: fcdb579263f ! 2: 9b12f17dc7e credential: erase all matching credentials
@@ Metadata
## Commit message ##
credential: erase all matching credentials
- Users expect that
- `echo "url=https://example.com" | git credential reject` or
- `echo "url=https://example.com\nusername=tim" | git credential reject`
- erase all matching credentials.
+ `credential reject` sends the erase action to each helper, but the
+ exact behaviour of erase isn't specified in documentation or tests.
+ Some helpers (such as credential-libsecret) delete all matching
+ credentials, others (such as credential-cache and credential-store)
+ delete at most one matching credential.
- Fixes for credential-cache and credential-store.
+ Test that helpers erase all matching credentials. This behaviour is
+ easiest to reason about. Users expect that `echo
+ "url=https://example.com" | git credential reject` or `echo
+ "url=https://example.com\nusername=tim" | git credential reject` erase
+ all matching credentials.
+
+ Fix credential-cache and credential-store.
Signed-off-by: M Hickford <mirth.hickford@gmail.com>
--
gitgitgadget
next prev parent reply other threads:[~2023-06-14 21:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 11:23 [PATCH 0/2] credential: improvements to erase in helpers M Hickford via GitGitGadget
2023-06-14 11:23 ` [PATCH 1/2] credential: avoid erasing distinct password M Hickford via GitGitGadget
2023-06-14 11:23 ` [PATCH 2/2] credential: erase all matching credentials M Hickford via GitGitGadget
2023-06-14 16:00 ` Junio C Hamano
2023-06-14 21:35 ` M Hickford
2023-06-14 21:40 ` M Hickford via GitGitGadget [this message]
2023-06-14 21:40 ` [PATCH v2 1/2] credential: avoid erasing distinct password M Hickford via GitGitGadget
2023-06-14 22:43 ` Jeff King
2023-06-15 4:51 ` M Hickford
2023-06-14 21:40 ` [PATCH v2 2/2] credential: erase all matching credentials M Hickford via GitGitGadget
2023-06-14 22:51 ` Jeff King
2023-06-15 4:57 ` M Hickford
2023-06-14 21:56 ` [PATCH v2 0/2] credential: improvements to erase in helpers Junio C Hamano
2023-06-14 22:51 ` Jeff King
2023-06-15 6:03 ` [PATCH v3 " M Hickford via GitGitGadget
2023-06-15 6:03 ` [PATCH v3 1/2] credential: avoid erasing distinct password M Hickford via GitGitGadget
2023-06-15 7:08 ` Jeff King
2023-06-15 6:03 ` [PATCH v3 2/2] credential: erase all matching credentials M Hickford via GitGitGadget
2023-06-15 7:09 ` Jeff King
2023-06-15 19:19 ` [PATCH v4 0/2] credential: improvements to erase in helpers M Hickford via GitGitGadget
2023-06-15 19:19 ` [PATCH v4 1/2] credential: avoid erasing distinct password M Hickford via GitGitGadget
2023-06-15 19:19 ` [PATCH v4 2/2] credential: erase all matching credentials M Hickford via GitGitGadget
2023-06-15 21:09 ` [PATCH v4 0/2] credential: improvements to erase in helpers Junio C Hamano
2023-06-15 21:21 ` Jeff King
2023-06-15 21:52 ` Junio C Hamano
2023-06-16 16:54 ` 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=pull.1525.v2.git.git.1686778838.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=mirth.hickford@gmail.com \
--cc=mjcheetham@outlook.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.
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.