Description
-
https://github.com/JuliaLang/julia/blob/8cd97c5980c0a6fb0860996399f49b2679aedddd/base/libgit2/blame.jl#L31-L39 There's two issues here: a)
hunk_ptrpoints intoblame, so the former needs to be scoped to the latter's lifetime b) The signature objects inside the loaded BlameHunk are owned byblame, so they need to be duplicated or otherwise scoped toblame.
https://github.com/JuliaLang/julia/blob/8cd97c5980c0a6fb0860996399f49b2679aedddd/base/libgit2/blob.jl#L21
ptr needs to be kept alive until the copy is done
msg_ptr needs to be scoped to c
The resulting signature needs to be duplicated or scoped to c
I suspect this is ok for regular uses of the iteration protocol, but it would be good to scope the ConfigEntry to the iterator that produced it.
Two bugs: a) delta_ptr needs to be scoped to the diff b) the file names inside the Delta are scoped to the diff as well (see https://github.com/libgit2/libgit2/blob/master/src/diff_generate.c#L47). Probably easiest to duplicate these rather than keep the diff around.
Same issue.
The result of the ccall is an interior pointer into the AnnotatedCommit, so we need to make sure to keep that alive until after the unsafe load
Need to keep the array alive until the hash is created (or even better let the array propagate to ccall, so ccall will do it for you).
Keep the git reference alive until the string is created
Same issue as the other getindex methods
Same issue
Object needs to be kept alive until the string result is created
Same in these four functions
The usual
The usual
oid_ptr needs to be appropriately scoped
And anything else I might have missed