remove_all_fetch_refspecs(): drop unused "remote" parameter

This function already takes a "key" parameter which uniquely identifies the config key that we need to remove. There's no need for it to look at the "remote" parameter at all. Let's drop it in the name of simplicity. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed May 9, 2019 at 17:31 UTC 113c29ade08054ba2c543b41570e3a6643022b3d
1 file changed +2 -2
builtin/remote.c
+2 -2
@@ -1407,7 +1407,7 @@ static int update(int argc, const char **argv)
1407 return retval;
1408 }
1409
1410 -static int remove_all_fetch_refspecs(const char *remote, const char *key)
1410 +static int remove_all_fetch_refspecs(const char *key)
1411 {
1412 return git_config_set_multivar_gently(key, NULL, NULL, 1);
1413 }
@@ -1437,7 +1437,7 @@ static int set_remote_branches(const char *remotename, const char **branches,
1437 if (!remote_is_configured(remote, 1))
1438 die(_("No such remote '%s'"), remotename);
1439
1440 - if (!add_mode && remove_all_fetch_refspecs(remotename, key.buf)) {
1440 + if (!add_mode && remove_all_fetch_refspecs(key.buf)) {
1441 strbuf_release(&key);
1442 return 1;
1443 }