Merge branch 'fg/remote-prune'

* fg/remote-prune:
  add tests for remote groups
  git remote update: Fallback to remote if group does not exist
  remote: New function remote_is_configured()
  git remote update: Report error for non-existing groups
  git remote update: New option --prune
  builtin-remote.c: Split out prune_remote as a separate function.
This commit is contained in:
Junio C Hamano
2009-04-12 16:46:41 -07:00
5 changed files with 159 additions and 37 deletions

View File

@ -667,6 +667,17 @@ struct remote *remote_get(const char *name)
return ret;
}
int remote_is_configured(const char *name)
{
int i;
read_config();
for (i = 0; i < remotes_nr; i++)
if (!strcmp(name, remotes[i]->name))
return 1;
return 0;
}
int for_each_remote(each_remote_fn fn, void *priv)
{
int i, result = 0;