nodegit icon indicating copy to clipboard operation
nodegit copied to clipboard

ConvenientPatch#hunks documentation is incorrect

Open JC3 opened this issue 2 years ago • 1 comments

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.

JC3 avatar Dec 14 '22 14:12 JC3

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

axkibe avatar Jan 20 '23 13:01 axkibe