Skip to content
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

ConvenientPatch#hunks documentation is incorrect #1960

Open
JC3 opened this issue Dec 14, 2022 · 1 comment
Open

ConvenientPatch#hunks documentation is incorrect #1960

JC3 opened this issue Dec 14, 2022 · 1 comment

Comments

@JC3
Copy link

JC3 commented Dec 14, 2022

The documentation at https://www.nodegit.org/api/convenient_patch/#hunks indicates that the return of hunks is an Array<ConvenientHunk>.

However, there is no such type as ConvenientHunk. It is not clear what hunks() actually returns.

@axkibe
Copy link

axkibe commented Jan 20, 2023

There is ConvenientHunk, the documentation for it is missing tough. see #1939

I managed to work out the relevant API by trial&error and inspecting the javascript objects.

See here where I query nodegit to return the diffs of a commit and fill them in my own down datastructures:

https://gitlab.com/csc1/gitengine/-/blob/main/src/Yagit/Server/Diffs.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants