nodegit
nodegit copied to clipboard
ConvenientPatch#hunks documentation is incorrect
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.
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