mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 22:55:47 +00:00
http: don't discard the HEAD ref
The fix for fetching from empty repositories (22935b06d
protocol:
don't store flushes; 2012-10-07) forgot to take into account the
deletion of the flush pkt in the HTTP transport. As a result, the HEAD
ref advertisement where we detect the remote's capabilities was
deleted instead. Fix this.
This commit is contained in:
parent
8ea05f3f8f
commit
aeba5e175a
@ -473,10 +473,7 @@ static int http_connect(git_transport *transport, int direction)
|
||||
giterr_set(GITERR_NET, "Invalid HTTP response");
|
||||
return t->error = -1;
|
||||
} else {
|
||||
/* Remove the comment and flush pkts */
|
||||
git_vector_remove(&transport->refs, 0);
|
||||
git__free(pkt);
|
||||
pkt = git_vector_get(&transport->refs, 0);
|
||||
/* Remove the comment pkt from the list */
|
||||
git_vector_remove(&transport->refs, 0);
|
||||
git__free(pkt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user