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
Enable git_push_transfer_progress - Help wanted #1500
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? |
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.
Looking really good, just found this one issue.
generate/input/descriptor.json
Outdated
@@ -2918,6 +2915,9 @@ | |||
"transfer_progress": { | |||
"dupFunction": "git_transfer_progress_dup" | |||
}, | |||
"push_transfer_progress": { |
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.
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
pushTransferProgress
callback forRemoteCallbacks
, which is used inRemote.push
.The docs for
PushOptions
says it accepts callbacks asRemoteCallbacks
which is correct, buttransferProgress
is 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!