summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8db3559)
raw | patch | inline | side by side (parent: 8db3559)
author | Björn Gustavsson <bgustavsson@gmail.com> | |
Thu, 31 Dec 2009 09:43:17 +0000 (10:43 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 31 Dec 2009 20:23:41 +0000 (12:23 -0800) |
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>
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>
builtin-remote.c | patch | blob | history | |
t/t5505-remote.sh | patch | blob | history |
diff --git a/builtin-remote.c b/builtin-remote.c
index fb0d66d8c5ab94156326fe5eb9ef91acb4992c00..50abd26a66c091e2374744cdf5bd3b0c5dce889e 100644 (file)
--- a/builtin-remote.c
+++ b/builtin-remote.c
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);
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index e931ce6c69c8819b4273e0c81eb17bf8d8eacc5d..989f1d44a579dedb58597cb65798cc1afbf80856 100755 (executable)
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
'
+test_expect_success 'update (with remotes.default defined)' '
+
+ (cd one &&
+ for b in $(git branch -r)
+ do
+ git branch -r -d $b || break
+ done &&
+ git config remotes.default "drosophila" &&
+ git remote update &&
+ git branch -r > output &&
+ test_cmp expect output)
+
+'
+
test_expect_success '"remote show" does not show symbolic refs' '
git clone one three &&