-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Clear out with/close/try/finally #20128
Conversation
8be62a6
to
6df2c31
Compare
base/libgit2/signature.jl
Outdated
@@ -15,15 +15,13 @@ function Signature(name::AbstractString, email::AbstractString) | |||
@check ccall((:git_signature_now, :libgit2), Cint, | |||
(Ptr{Ptr{SignatureStruct}}, Cstring, Cstring), sig_ptr_ptr, name, email) | |||
sig = GitSignature(sig_ptr_ptr[]) | |||
s = Signature(sig.ptr) | |||
close(sig) | |||
s = Signature(sig.ptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return Signature(sig.ptr)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Fine with me. I'm happy to continue to do style cleanup on this PR while we wait. |
6df2c31
to
7ccde63
Compare
base/libgit2/libgit2.jl
Outdated
if isa(err, GitError) | ||
throw(GitError(Error.Object, err.Code, "cannot create branch `$branch_name` with `$commit_id`")) | ||
else | ||
rethrow(e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Derp, thanks <3
7ccde63
to
f526c04
Compare
Looks like some files under |
9ee6603
to
de93d3b
Compare
Is the arrayops thing to do with me? |
15c83b8
to
a61e579
Compare
Likely. That happens if you try to delete a file that you still have open handles to. |
It seems to be failing on |
a61e579
to
0315300
Compare
0315300
to
bca780c
Compare
Replaced some `close` calls with explicit `free` on pointers.
bca780c
to
a7b25a7
Compare
This is hella old and conflicted so I'm going to close (ironic, I know) and try again. |
Replaced some
close
calls with explicitfree
on pointers.I did a little bit of whitespace prettying as well.