implemented Index.AddAll as git_index_add_all wrapper #125
Loading…
Reference in New Issue
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The callback is currently ignored. I'm not sure how to implement it properly, probably you should take a look before merging.
The callback would likely have to go through C in
wrapper.c
. What we'd have to do here is have libgit2 call a specific function which would take thecallback
parameter as its payload and then call that. We have the payload in the C API because we don't have closures there, but we shouldn't expose that for Go. If the user wants to have a context, they should use a closure in go. We then use this payload argument for the exposed version to know what to dispatch to. Something likeand you pass in
addAllCallback
as the callback togit_index_add_all()
and the Go functioncallback
as the payload.Okay, I think i've implemented callbacks the way you meant, could you please double-check? I also added UpdateAll and RemoveAll.
Oh, and I also removed the payload parameter from the callback. I don't think it's necessary if you can just capture stuff within the closure.
Sorry for taking a few tries, I didn't try go 1.1 before. I've rebased everything, fixed the thing with the const (you were of course right 😄), so it should hopefully be complete now :)
Neat, thanks!