git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] docs: minor tweaks to credentials API

From
Jeff King <peff@peff.net>
Date
Sep 14, 2011, 19:17 UTC
Message-ID
<20110914191745.GA28267@sigill.intra.peff.net>
In-Reply-To
<20110914191704.GA23201@sigill.intra.peff.net>
These are in response to Junio's comments:
  1. Clarify how credential rejection works (first we call
     helpers, then we clear fields, so helpers get fields).
  2. Clarify quoting of keys/values returned from helpers.
Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/technical/api-credentials.txt |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt
index 335a007..b2eb24c 100644
--- a/Documentation/technical/api-credentials.txt
+++ b/Documentation/technical/api-credentials.txt
@@ -48,10 +48,11 @@ Functions
 `credential_reject`::
 
 	Inform the credential subsystem that the provided credentials
-	have been rejected. This will clear the username and password
-	fields in `struct credential`, as well as notify any helpers of
-	the rejection (which may, for example, purge the invalid
-	credentials from storage).
+	have been rejected. This will notify any helpers of the
+	rejection (which allows them to, for example, purge the invalid
+	credentials from storage), and then clear the username and
+	password fields in `struct credential`. It can then be
+	`credential_fill`-ed again.
 
 `credential_getpass`::
 
@@ -98,8 +99,11 @@ command line:
 
 The helper should produce a list of items on stdout, each followed by a
 newline character. Each item should consist of a key-value pair, separated
-by an `=` (equals) sign. The value may contain any bytes except a
-newline. When reading the response, git understands the following keys:
+by an `=` (equals) sign. The key can contain any bytes except `=` or
+newline. The value may contain any bytes except a newline. In both
+cases, all bytes are treated as-is (i.e., there is no quoting, and one
+cannot transmit a value with newline in it). When reading the response,
+git understands the following keys:
 
 `username`::
 
-- 
1.7.6.252.ge9c18
Previous: Jeff KingNext: Jeff King
Message 2 of 12 in “credential helper super fun pak”
  1. 0/5 credential helper super fun pakJeff King, Sep 14, 2011
  2. 1/5 docs: minor tweaks to credentials APIJeff King, Sep 14, 2011
  3. 2/5 credential-cache: fix expiration calculation corner casesJeff King, Sep 14, 2011
  4. Thomas RastSep 15, 2011
  5. 1/2 t0300: add missing EOF terminator for <<Thomas Rast, Sep 16, 2011
  6. 2/2 check_expirations: don't copy over same elementThomas Rast, Sep 16, 2011
  7. Jeff KingSep 16, 2011
  8. Junio C HamanoSep 18, 2011
  9. 3/5 t0300: make askpass tests a little more robustJeff King, Sep 14, 2011
  10. 4/5 t0300: make alternate username tests more robustJeff King, Sep 14, 2011
  11. 5/5 credential-store: use a better storage formatJeff King, Sep 14, 2011
  12. Junio C HamanoSep 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.