Thread (18 messages) 18 messages, 6 authors, 2024-04-02

Re: [PATCH 4/4] osxkeychain: store new attributes

From: Eric Sunshine <hidden>
Date: 2024-02-18 06:31:46

On Sat, Feb 17, 2024 at 6:35 PM Bo Anderson via GitGitGadget
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
d208bfdfef (credential: new attribute password_expiry_utc, 2023-02-18)
and a5c76569e7 (credential: new attribute oauth_refresh_token,
2023-04-21) introduced new credential attributes but support was missing
from git-credential-osxkeychain.
[...]
Signed-off-by: Bo Anderson <redacted>
---
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -6,10 +6,12 @@
 static CFStringRef host;
+static CFNumberRef port;
 static CFStringRef path;
-static CFNumberRef port;
@@ -17,6 +19,10 @@ static void clear_credential(void)
+       if (port) {
+               CFRelease(port);
+               port = NULL;
+       }
@@ -29,12 +35,18 @@ static void clear_credential(void)
-       if (port) {
-               CFRelease(port);
-               port = NULL;
+       if (password_expiry_utc) {
+               CFRelease(password_expiry_utc);
+               password_expiry_utc = NULL;
+       }
The relocation of `port` is unrelated to the stated purpose of this
patch. We would normally avoid this sort of "noise" change since it
obscures the "real" changes made by the patch, and would instead place
it in its own patch. That said, it's such a minor issue, I doubt that
it's worth a reroll.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help