-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add LGitRemote>>defaultBranchName (WIP) #40
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? |
ifTrue: [ | ||
self shouldBeImplemented. | ||
self remote_connect_v0251: remote direction: direction callbacks: remoteCallbacks ] | ||
ifFalse: [ | ||
self remote_connect_v100: remote direction: direction callbacks: remoteCallbacks ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buf := LGitBuf new. | ||
[ self withReturnHandlerDo: [ | ||
self remote_default_branch: buf ]. | ||
defaultBranchName := buf prim_ptr readStringUTF8. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This readStringUTF8 needs update, I think
Please check #71 |
I tested it locally with this code:
TODO:
String
.connectFetch
?