Skip to content

Remove manual connection to remote #1038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2015
Merged

Conversation

Therzok
Copy link
Member

@Therzok Therzok commented May 4, 2015

@Therzok
Copy link
Member Author

Therzok commented May 4, 2015

/cc @nulltoken

@Therzok
Copy link
Member Author

Therzok commented May 4, 2015

This resulted in double dialog asking for credentials on MonoDevelop, and I traced it back here.

@carlosmn
Copy link
Member

carlosmn commented May 4, 2015

The connect called from inside _push() should be a no-op. If it's connecting twice, that would mean it's a bug in libgit2.

@Therzok
Copy link
Member Author

Therzok commented May 4, 2015

Explanation:

Before, it was not attemping a remote connection if you were connected already to the remote. Now, it always attempts a connection.

@Therzok
Copy link
Member Author

Therzok commented May 4, 2015

This fixes the issue I was having though, so I'm pretty sure it's getting double connection in libgit2 land. I'm getting the credential callback twice, once from git_remote_connect, once from git_remote_push.

@carlosmn
Copy link
Member

carlosmn commented May 4, 2015

That would mean that _connect() tries to connect even though it's already connected, which is a bug, which you're hiding here, rather than fixing.

@Therzok
Copy link
Member Author

Therzok commented May 4, 2015

Opened an issue on libgit2 side. :P Until then, this works for me.

@nulltoken
Copy link
Member

@Therzok The amazing @carlosmn will work on the libgit2 side. Meanwhile, your proposal is sound. Could you please update your commit, and drop git_remote_connect() git_remote_disconnect() from the NativeMethods and Proxy types as well (as git_remote_free() takes care of calling it)?

@Therzok
Copy link
Member Author

Therzok commented May 23, 2015

@nulltoken it's not used only there.

git_remote_connect() is also used in Network.ListReferences(), which libgit2 doesn't seem to handle for connect/disconnect.

Also, libgit2/libgit2#3096 for reference.

@nulltoken
Copy link
Member

@Therzok Sorry. It was a typo. I meant _disconnect()

@Therzok Therzok force-pushed the Therzok-remove-forced-connection branch from 4fa581f to 9ddca31 Compare May 24, 2015 14:01
@Therzok
Copy link
Member Author

Therzok commented May 24, 2015

Done.

@nulltoken nulltoken added this to the v0.22 milestone May 24, 2015
nulltoken added a commit that referenced this pull request May 24, 2015
@nulltoken nulltoken merged commit 659be88 into vNext May 24, 2015
@nulltoken nulltoken deleted the Therzok-remove-forced-connection branch May 24, 2015 16:41
@nulltoken
Copy link
Member

👍 🍌

@nulltoken
Copy link
Member

Published as NuGet pre-release package LibGit2Sharp.0.22.0-pre20150527180327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants