aboutsummaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-26 13:37:09 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-26 13:37:09 -0800
commitae2f25542ffdd1919b33c8f274f8172e49d64dbf (patch)
tree0ab622542d3787b56ac6aae7b9d4f3977a701e7a /builtin/fetch.c
parent56f37fda511e1615dc6df86c68f3b841711a7828 (diff)
parenta31eeae27f38246ba35000fa603d884cdd1a81ae (diff)
downloadgit-ae2f25542ffdd1919b33c8f274f8172e49d64dbf.tar.gz
git-ae2f25542ffdd1919b33c8f274f8172e49d64dbf.tar.xz
Merge branch 'tg/git-remote'
The internal API to interact with "remote.*" configuration variables has been streamlined. * tg/git-remote: remote: use remote_is_configured() for add and rename remote: actually check if remote exits remote: simplify remote_is_configured() remote: use parse_config_key
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 55919a9e4..48c45ea5e 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1022,10 +1022,9 @@ static int add_remote_or_group(const char *name, struct string_list *list)
git_config(get_remote_group, &g);
if (list->nr == prev_nr) {
- struct remote *remote;
- if (!remote_is_configured(name))
+ struct remote *remote = remote_get(name);
+ if (!remote_is_configured(remote))
return 0;
- remote = remote_get(name);
string_list_append(list, remote->name);
}
return 1;