Skip to content

Commit 113c29a

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c95fc72 commit 113c29a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/remote.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ static int update(int argc, const char **argv)
14071407
return retval;
14081408
}
14091409

1410-
static int remove_all_fetch_refspecs(const char *remote, const char *key)
1410+
static int remove_all_fetch_refspecs(const char *key)
14111411
{
14121412
return git_config_set_multivar_gently(key, NULL, NULL, 1);
14131413
}
@@ -1437,7 +1437,7 @@ static int set_remote_branches(const char *remotename, const char **branches,
14371437
if (!remote_is_configured(remote, 1))
14381438
die(_("No such remote '%s'"), remotename);
14391439

1440-
if (!add_mode && remove_all_fetch_refspecs(remotename, key.buf)) {
1440+
if (!add_mode && remove_all_fetch_refspecs(key.buf)) {
14411441
strbuf_release(&key);
14421442
return 1;
14431443
}

0 commit comments

Comments
 (0)