diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-07 15:31:21 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-07 15:38:13 +0000 |
commit | 9ad96367fbbbbc6aa233bfa2f808a3ec8bf11bb2 (patch) | |
tree | 4383613c77e94b147328da9566ed7493d14d929a /src/commit.c | |
parent | fa7aba70d8c1bc68cd2572d808c66059df6da989 (diff) | |
download | libgit2-9ad96367fbbbbc6aa233bfa2f808a3ec8bf11bb2.tar.gz |
smart transport: only clear url on hard resetethomson/smart_transport_url
After creating a transport for a server, we expect to be able to call
`connect`, then invoke subsequent `action` calls. We provide the URL to
these `action` calls, although our built-in transports happen to ignore
it since they've already parsed it into an internal format that they
intend to use (`gitno_connection_data`).
In ca2eb4608243162a13c427e74526b6422d5a6659, we began clearing the URL
field after a connection, meaning that subsequent calls to transport
`action` callbacks would get a NULL URL, which went undetected since the
builtin transports ignore the URL when they're already connected
(instead of re-parsing it into an internal format).
Downstream custom transport implementations (eg, LibGit2Sharp) did
notice this change, however.
Since `reset_stream` is called even when we're not closing the
subtransport, update to only clear the URL when we're closing the
subtransport. This ensures that `action` calls will get the correct URL
information even after a connection.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions