From e52566a630c30e017ebaf3f0d8da10f9fba9b3c1 Mon Sep 17 00:00:00 2001 From: Cam Hutchison Date: Tue, 27 Aug 2024 21:51:35 +1000 Subject: [PATCH] fixup! Add first cut of git-credential-fdoss Simplify wording of formatSecretVal doc string. Add link to secret encoding in git-credential-libsecret. Addresses: https://github.com/foxygoat/git-credential-fdoss/pull/3#discussion_r1708477175 --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 97e8c11..a66743c 100644 --- a/main.go +++ b/main.go @@ -228,10 +228,9 @@ func makeAttrs(gc *GitCredential) map[string]string { // formatSecretVal encodes the secret and/or variable parts of a GitCredential // into a string suitable for storing with the secret service. Variable parts, // such as the password expiry time, cannot be encoded as an attribute as they -// need to match when looking up and such variable parts cannot be used for -// that. +// need to match on lookup. // -// The format for encoding multiple values is the same as used by +// The format for [encoding] multiple values is the same as used by // git-credential-libsecret so as to be compatible with it. // // Note: This format is not compatible with the unencrypted keyring format of @@ -242,6 +241,8 @@ func makeAttrs(gc *GitCredential) map[string]string { // as if you are going to store your passwords in plain text, you may as well // use git-credential-store. However, one may want all their credentials // together in one place stored in plain text for easier exploitation. +// +// [encoding]: https://github.com/git/git/blob/159f2d50e75c17382c9f4eb7cbda671a6fa612d1/contrib/credential/libsecret/git-credential-libsecret.c#L212 func formatSecretVal(gc *GitCredential) string { secret := gc.Password if gc.PasswordExpiryUTC != "" {