X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=credential.c;h=aa996669fc40021e0c8cb01fa8021da7064e2781;hb=65a0a8e5facb42f41561a96af209016954878b63;hp=7d6501d190a529933d501e7f7006a70c4897282b;hpb=f55f97cb3307f49e6b15d9f0145b6d3f00b22ff7;p=thirdparty%2Fgit.git diff --git a/credential.c b/credential.c index 7d6501d190..aa996669fc 100644 --- a/credential.c +++ b/credential.c @@ -63,9 +63,12 @@ static int credential_config_callback(const char *var, const char *value, key = dot + 1; } - if (!strcmp(key, "helper")) - string_list_append(&c->helpers, value); - else if (!strcmp(key, "username")) { + if (!strcmp(key, "helper")) { + if (*value) + string_list_append(&c->helpers, value); + else + string_list_clear(&c->helpers, 0); + } else if (!strcmp(key, "username")) { if (!c->username) c->username = xstrdup(value); }