Enable git_push_transfer_progress - Help wanted#1500
Conversation
|
Perhaps this is something the |
|
@rcjsuen The overrides, from the supplement file, are applied after the |
|
@rcjsuen I've got it working using the supplement file and changing I will get onto the test case shortly. |
|
@rcjsuen I've setup the test using a local bare repository... Once again, I'm not sure if the approach is correct, but it works. Update 2: Tried building from a clean repo and the build/test failed. Update: Forgot to credit your advice, sorry... I'm now looking into the build errors. It seems that the culprit is: |
|
Have rewritten the This means we can now declare a callback from the libgit2-supplement.json file using I hope this approach is alright, I can't see another way around it. I'm also not sure why libgit have named the function without @rcjsuen Any suggestions for moving this forward? |
|
@rcjsuen All checks have passed now, is there any chance of pushing this one through? |
implausible
left a comment
There was a problem hiding this comment.
Looking really good, just found this one issue.
| "transfer_progress": { | ||
| "dupFunction": "git_transfer_progress_dup" | ||
| }, | ||
| "push_transfer_progress": { |
There was a problem hiding this comment.
I don't believe you need this block. There is no git_push_transfer_progress struct, and it is also theoretically would not compile if that struct was passed to the dupFunction you declared here.
|
@implausible No worries, I've made the changes. |
|
Thanks! |
|
Any word on this merge going live? |
Have enabled the
pushTransferProgresscallback forRemoteCallbacks, which is used inRemote.push.The docs for
PushOptionssays it accepts callbacks asRemoteCallbackswhich is correct, buttransferProgressis only for downloads, libgit has separate API for uploads.I've been able to get the callback (
pushTransferProgress) working, similar totransferProgress(with throttling). I just need help finishing it off.Current Issues
Generate - The generate callback function uses a regex pattern (
/\s*_(cb|fn)/) against the function name which isn't satisfied by libgit function namegit_push_transfer_progress. For now, I've just put in a strict check to bypass.Testing - I'm unable to get the test case working... I keep getting credentials errors. I was able to get it working by setting up a local bare repo and have the test push to that.
Docs - May need to update the docs to reflect the changes.
It would be great to get some help finishing this off.
Cheers!