summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 6ab101fa6d..c26866e674 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1782,11 +1782,10 @@ static int do_fetch(struct transport *transport,
"refs/tags/");
}
- if (uses_remote_tracking(transport, rs)) {
- must_list_refs = 1;
+ if (must_list_refs &&
+ uses_remote_tracking(transport, rs))
strvec_push(&transport_ls_refs_options.ref_prefixes,
"HEAD");
- }
if (must_list_refs) {
trace2_region_enter("fetch", "remote_refs", the_repository);