Add support for mempack #448
Loading…
Reference in New Issue
No description provided.
Delete Branch "mempack"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This allows the creation of git packfiles without needing to write them
to the filesystem.
This still needs to actually free the mempack, not just unset the finalizer.
We only need to lock the thread if we're going to deal with errors.
The free should happen inside
Mempack.Free
.@ -0,0 +69,4 @@
runtime.KeepAlive(repository)
if ret < 0 {
return nil, MakeGitError(ret)
}
We need to keep
repository
alive until here, or the runtime might free it.Actually since ownership transfers to the repository and the freeing only happens in the constructor, there is no need for a finalizer or
Mempack.Free()
at all.done, also added some tests, which uncovered the fact that
repository
needs to be non-null to prevent a SIGSEGV insidegit_mempack_dump
, so removed a nil-check.Removed
Removed
Removed.
@ -0,0 +69,4 @@
runtime.KeepAlive(repository)
if ret < 0 {
return nil, MakeGitError(ret)
}
Done
Thanks, I added an extra keepalive that was missing (these are so annoying).