libgit2/libgit2 — pull request #2719 by carlosmn (2014-11-19 20:00:00+00:00)
Title: fetch: clear the connection data on close

When we fetch twice with the same remote object, we did not properly
clear the connection flags, so we would leak state from the last
connection.

This can cause the second fetch with the same remote object to fail if
using a HTTP URL where the server redirects to HTTPS, as the second
fetch would see `use_ssl` set and think the initial connection wanted to
downgrade the connection.

This should fix #2712