Make ls-remote http://... list HEAD, like for git://...
This makes a struct ref able to represent a symref, and makes http.c able to recognize one, and makes transport.c look for "HEAD" as a ref in the list, and makes it dereference symrefs for the resulting ref, if any. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
c13b2633f4
commit
be885d96fe
5
http.c
5
http.c
@ -626,7 +626,10 @@ int http_fetch_ref(const char *base, struct ref *ref)
|
||||
strbuf_rtrim(&buffer);
|
||||
if (buffer.len == 40)
|
||||
ret = get_sha1_hex(buffer.buf, ref->old_sha1);
|
||||
else
|
||||
else if (!prefixcmp(buffer.buf, "ref: ")) {
|
||||
ref->symref = xstrdup(buffer.buf + 5);
|
||||
ret = 0;
|
||||
} else
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = error("Couldn't get %s for %s\n%s",
|
||||
|
||||
Reference in New Issue
Block a user