diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-08 09:17:00 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-08 09:17:00 -0700 |
commit | e250c5914fd151caf228cbda6c30560c266bcfef (patch) | |
tree | 8420c1badd4b4599d859f7f6ddab8fff5cf8bf14 /builtin | |
parent | Merge branch 'jk/maint-pass-c-config-in-env' (diff) | |
parent | builtin/fetch.c: ignore merge config when not fetching from branch's remote (diff) | |
download | tgif-e250c5914fd151caf228cbda6c30560c266bcfef.tar.xz |
Merge branch 'bc/maint-fetch-url-only'
* bc/maint-fetch-url-only:
builtin/fetch.c: ignore merge config when not fetching from branch's remote
t/t5510: demonstrate failure to fetch when current branch has merge ref
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index fab3fce512..fccc9cbea3 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -146,7 +146,9 @@ static struct ref *get_ref_map(struct transport *transport, struct remote *remote = transport->remote; struct branch *branch = branch_get(NULL); int has_merge = branch_has_merge_config(branch); - if (remote && (remote->fetch_refspec_nr || has_merge)) { + if (remote && + (remote->fetch_refspec_nr || + (has_merge && !strcmp(branch->remote_name, remote->name)))) { for (i = 0; i < remote->fetch_refspec_nr; i++) { get_fetch_map(remote_refs, &remote->fetch[i], &tail, 0); if (remote->fetch[i].dst && |