diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-20 13:23:59 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-20 13:23:59 -0800 |
commit | 66276d972c0682d49773c20ca67c33bdab9ab76d (patch) | |
tree | 2a7f0631c1fcb6ba779910da23d24b88d9f4a488 | |
parent | ce67b3eed896e0884ca4cdc2edce9a032cefe45a (diff) | |
parent | 4f2e842dd0046a12bd82bb2b5aa066c686dc3f44 (diff) | |
download | git-66276d972c0682d49773c20ca67c33bdab9ab76d.tar.gz |
Merge branch 'bg/maint-remote-update-default' into maint
* bg/maint-remote-update-default:
Fix "git remote update" with remotes.defalt set
-rw-r--r-- | builtin-remote.c | 10 | ||||
-rwxr-xr-x | t/t5505-remote.sh | 14 |
2 files changed, 18 insertions, 6 deletions
diff --git a/builtin-remote.c b/builtin-remote.c index a5019397ff..c4945b8708 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -1238,13 +1238,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); diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index fd166d9de3..936fe0a1a6 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 && |