Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-05-10 00:31:46 +0300
committerJunio C Hamano <gitster@pobox.com>2019-05-13 08:22:54 +0300
commit113c29ade08054ba2c543b41570e3a6643022b3d (patch)
tree7f6d72bd5c35fa304fae75c0dc266c2bcaf2453c /builtin/remote.c
parentc95fc72f47341cf7cf80b3b878cc8d35684bc1e8 (diff)
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>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index f7edf7f2cb..5591cef775 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1407,7 +1407,7 @@ static int update(int argc, const char **argv)
return retval;
}
-static int remove_all_fetch_refspecs(const char *remote, const char *key)
+static int remove_all_fetch_refspecs(const char *key)
{
return git_config_set_multivar_gently(key, NULL, NULL, 1);
}
@@ -1437,7 +1437,7 @@ static int set_remote_branches(const char *remotename, const char **branches,
if (!remote_is_configured(remote, 1))
die(_("No such remote '%s'"), remotename);
- if (!add_mode && remove_all_fetch_refspecs(remotename, key.buf)) {
+ if (!add_mode && remove_all_fetch_refspecs(key.buf)) {
strbuf_release(&key);
return 1;
}