Before the previous commit, we had to make sure that
read_config() was called before entering remote_get_1,
because we needed to pass pushremote_name by value. But now
that we pass a function, we can let remote_get_1 handle
loading the config itself, turning our wrappers into true
one-liners.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
struct remote *ret;
int name_given = 0;
+ read_config();
+
if (name)
name_given = 1;
else
struct remote *remote_get(const char *name)
{
- read_config();
return remote_get_1(name, remote_for_branch);
}
struct remote *pushremote_get(const char *name)
{
- read_config();
return remote_get_1(name, pushremote_for_branch);
}