We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
finish
1 parent 240c195 commit f537312Copy full SHA for f537312
src/push.c
@@ -476,9 +476,10 @@ int git_push_finish(git_push *push, const git_remote_callbacks *callbacks)
476
{
477
int error;
478
479
- if (!git_remote_connected(push->remote) &&
480
- (error = git_remote__connect(push->remote, GIT_DIRECTION_PUSH, callbacks, &push->connection)) < 0)
481
- return error;
+ if (!git_remote_connected(push->remote)) {
+ git_error_set(GIT_ERROR_NET, "remote is disconnected");
+ return -1;
482
+ }
483
484
if ((error = filter_refs(push->remote)) < 0 ||
485
(error = do_push(push, callbacks)) < 0)
0 commit comments