summaryrefslogtreecommitdiff
path: root/builtin-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-remote.c')
-rw-r--r--builtin-remote.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/builtin-remote.c b/builtin-remote.c
index 51df99ba93..ca7c639ad3 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -1232,8 +1232,14 @@ static int update(int argc, const char **argv)
int groups_found = 0;
remote_group.name = argv[i];
result = git_config(get_remote_group, &groups_found);
- if (!groups_found && (i != 1 || strcmp(argv[1], "default")))
- die("No such remote group: '%s'", argv[i]);
+ if (!groups_found && (i != 1 || strcmp(argv[1], "default"))) {
+ struct remote *remote;
+ if (!remote_is_configured(argv[i]))
+ die("No such remote or remote group: %s",
+ argv[i]);
+ remote = remote_get(argv[i]);
+ string_list_append(remote->name, remote_group.list);
+ }
}
if (!result && !list.nr && argc == 2 && !strcmp(argv[1], "default"))