Conversation
Answer the name of the remote's default branch.
There is an API function to disconnect but there is no requirement about disconnecting (neither in connect or the example). --- update -- Yes, when the remote is freed the connection is closed: https://libgit2.org/libgit2/#v1.0.0/group/remote/git_remote_free |
No, we shouldn't care of it for next versions of Iceberg. |
|
@tinchodias is this still relevant? |
|
Yes, I'd do a little pass again. But it doesn't harm to have it... it's API provided by libgit2 that wasn't bound yet. IIRC, after this is available, it would be possible that Metacello uses it to determine what's the branch to load when there is no explicit Anyway, I have no idea of how possible is to have that modification in Metacello. It may break something. |
|
Could also use the .project file and have Metacello look for that. |
|
Hi @tinchodias are there news on this front? |
|
@tinchodias Any update on this? |
| ^ self ffiLibrary uniqueInstance version first = 0 | ||
| ifTrue: [ | ||
| self shouldBeImplemented. | ||
| self remote_connect_v0251: remote direction: direction callbacks: remoteCallbacks ] | ||
| ifFalse: [ | ||
| self remote_connect_v100: remote direction: direction callbacks: remoteCallbacks ] |
| buf := LGitBuf new. | ||
| [ self withReturnHandlerDo: [ | ||
| self remote_default_branch: buf ]. | ||
| defaultBranchName := buf prim_ptr readStringUTF8. |
There was a problem hiding this comment.
This readStringUTF8 needs update, I think
|
Please check #71 |

I tested it locally with this code:
TODO:
String.connectFetch?