From 4f2e842dd0046a12bd82bb2b5aa066c686dc3f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 31 Dec 2009 10:43:17 +0100 Subject: Fix "git remote update" with remotes.defalt set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/t5505-remote.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 't') diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index e931ce6c69..989f1d44a5 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -419,6 +419,20 @@ test_expect_success 'update default (overridden, with funny whitespace)' ' ' +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 && -- cgit v1.2.1