Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions contrib/credential/osxkeychain/git-credential-osxkeychain.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ static CFStringRef username;
static CFDataRef password;
static CFDataRef password_expiry_utc;
static CFDataRef oauth_refresh_token;
static int state_seen;

static void clear_credential(void)
{
Expand Down Expand Up @@ -172,9 +171,6 @@ static OSStatus find_internet_password(void)

CFRelease(item);

write_item("capability[]", "state", strlen("state"));
write_item("state[]", "osxkeychain:seen=1", strlen("osxkeychain:seen=1"));

out:
CFRelease(attrs);

Expand Down Expand Up @@ -288,9 +284,6 @@ static OSStatus add_internet_password(void)
CFDictionaryRef attrs;
OSStatus result;

if (state_seen)
return errSecSuccess;

/* Only store complete credentials */
if (!protocol || !host || !username || !password)
return -1;
Expand Down Expand Up @@ -402,10 +395,6 @@ static void read_credential(void)
oauth_refresh_token = CFDataCreate(kCFAllocatorDefault,
(UInt8 *)v,
strlen(v));
else if (!strcmp(buf, "state[]")) {
if (!strcmp(v, "osxkeychain:seen=1"))
state_seen = 1;
}
/*
* Ignore other lines; we don't know what they mean, but
* this future-proofs us when later versions of git do
Expand Down
Loading