aboutsummaryrefslogtreecommitdiff
path: root/builtin-remote.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <bgustavsson@gmail.com>2009-12-31 10:43:17 +0100
committerJunio C Hamano <gitster@pobox.com>2009-12-31 12:23:41 -0800
commit4f2e842dd0046a12bd82bb2b5aa066c686dc3f44 (patch)
tree599bdd05e261c2fc93fd02e918ddc0a0ae26cd5d /builtin-remote.c
parent8db355964d89c19eb262ffe38e57e5a610e1cc05 (diff)
downloadgit-4f2e842dd0046a12bd82bb2b5aa066c686dc3f44.tar.gz
git-4f2e842dd0046a12bd82bb2b5aa066c686dc3f44.tar.xz
Fix "git remote update" with remotes.defalt set
Starting from commit 8db35596, "git remote update" (with no group name given) will fail with the following message if remotes.default has been set in the config file: fatal: 'default' does not appear to be a git repository fatal: The remote end hung up unexpectedly The problem is that the --multiple option is not passed to "git fetch" if no remote or group name is given on the command line. Fix the problem by always passing the --multiple option to "git fetch" (which actually simplifies the code). Reported-by: YONETANI Tomokazu Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-remote.c')
-rw-r--r--builtin-remote.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin-remote.c b/builtin-remote.c
index fb0d66d8c..50abd26a6 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -1206,13 +1206,11 @@ static int update(int argc, const char **argv)
fetch_argv[fetch_argc++] = "--prune";
if (verbose)
fetch_argv[fetch_argc++] = "-v";
- if (argc < 2) {
+ fetch_argv[fetch_argc++] = "--multiple";
+ if (argc < 2)
fetch_argv[fetch_argc++] = "default";
- } else {
- fetch_argv[fetch_argc++] = "--multiple";
- for (i = 1; i < argc; i++)
- fetch_argv[fetch_argc++] = argv[i];
- }
+ for (i = 1; i < argc; i++)
+ fetch_argv[fetch_argc++] = argv[i];
if (strcmp(fetch_argv[fetch_argc-1], "default") == 0) {
git_config(get_remote_default, &default_defined);