aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-21 12:01:03 -0800
committerJunio C Hamano <gitster@pobox.com>2010-02-21 12:01:03 -0800
commitcab1b013e6f7cc52806926a792c6798f4c7ac4be (patch)
tree83f6255c8b7fd2beb7abd2c356eb655509ef988c /transport.c
parentdb3df36a3d2e222fa8469c16724a74192c5529a0 (diff)
parentb0d66e156c5b312d468344569202d8ca4094f67f (diff)
downloadgit-cab1b013e6f7cc52806926a792c6798f4c7ac4be.tar.gz
git-cab1b013e6f7cc52806926a792c6798f4c7ac4be.tar.xz
Merge branch 'tc/maint-transport-ls-remote-with-void'
* tc/maint-transport-ls-remote-with-void: transport: add got_remote_refs flag
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 3846aacb4..08e4fa035 100644
--- a/transport.c
+++ b/transport.c
@@ -918,6 +918,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
if (!remote)
die("No remote provided to transport_get()");
+ ret->got_remote_refs = 0;
ret->remote = remote;
helper = remote->foreign_vcs;
@@ -1079,8 +1080,10 @@ int transport_push(struct transport *transport,
const struct ref *transport_get_remote_refs(struct transport *transport)
{
- if (!transport->remote_refs)
+ if (!transport->got_remote_refs) {
transport->remote_refs = transport->get_refs_list(transport, 0);
+ transport->got_remote_refs = 1;
+ }
return transport->remote_refs;
}