]> git.ipfire.org Git - thirdparty/git.git/blobdiff - credential.c
credential-cache: implement authtype capability
[thirdparty/git.git] / credential.c
index 98b040cf11a0c569901265c197d07dc326d8b9d4..ffaf31499e3af8e06578fd2417b1314dbfc7494f 100644 (file)
@@ -80,7 +80,8 @@ int credential_match(const struct credential *want,
               CHECK(host) &&
               CHECK(path) &&
               CHECK(username) &&
-              (!match_password || CHECK(password));
+              (!match_password || CHECK(password)) &&
+              (!match_password || CHECK(credential));
 #undef CHECK
 }
 
@@ -248,8 +249,8 @@ static void credential_getpass(struct credential *c)
                                                 PROMPT_ASKPASS);
 }
 
-static int credential_has_capability(const struct credential_capability *capa,
-                                    enum credential_op_type op_type)
+int credential_has_capability(const struct credential_capability *capa,
+                             enum credential_op_type op_type)
 {
        /*
         * We're checking here if each previous step indicated that we had the