Code

remote-curl: use http_fetch_ref() instead of walker wrapper
authorTay Ray Chuan <rctay89@gmail.com>
Tue, 2 Mar 2010 10:49:30 +0000 (18:49 +0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Mar 2010 19:10:36 +0000 (11:10 -0800)
The http-walker implementation of walker->fetch_ref() doesn't do
anything special compared to http_fetch_ref() anyway.

Remove init_walker() invocation before fetching the ref, since we aren't
using the walker wrapper and don't need a walker instance anymore.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-curl.c

index e8485d1552e20f65eb4f4ebfb95d7365274d1105..aa9f279014d9c0dcda7b90d647fea695e945a9dd 100644 (file)
@@ -249,9 +249,8 @@ static struct ref *parse_info_refs(struct discovery *heads)
                i++;
        }
 
-       init_walker();
        ref = alloc_ref("HEAD");
-       if (!walker->fetch_ref(walker, ref) &&
+       if (!http_fetch_ref(url, ref) &&
            !resolve_remote_symref(ref, refs)) {
                ref->next = refs;
                refs = ref;