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
This commit is contained in:
Junio C Hamano
2016-02-26 13:37:09 -08:00
5 changed files with 81 additions and 65 deletions

View File

@ -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;