credential: add credential.*.username
[gitweb.git] / credential.c
index 96be1c22dd4b6188aef9c89de51ffe6ac08a0331..3c17ea19732c01dbd2a32bd3f3c97483ef2f5556 100644 (file)
@@ -65,6 +65,10 @@ static int credential_config_callback(const char *var, const char *value,
 
        if (!strcmp(key, "helper"))
                string_list_append(&c->helpers, value);
+       else if (!strcmp(key, "username")) {
+               if (!c->username)
+                       c->username = xstrdup(value);
+       }
 
        return 0;
 }