FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remote leak fix by srajko · Pull Request #981 · nodegit/nodegit · GitHub

Repository navigation

Remote leak fix - #981

Merged
johnhaley81 merged 4 commits into
nodegit:masterfrom
srajko:remote-leak-fix
Apr 7, 2016
Merged

johnhaley81 merged 4 commits into
nodegit:masterfrom
srajko:remote-leak-fix

Conversation

srajko commented Apr 1, 2016

Copy link
Copy Markdown
Collaborator

Makes remotes self-freeing.

I needed to add new functionality for https://libgit2.github.com/libgit2/#HEAD/group/remote/git_remote_get_refspec, because the returned refspec belongs to the remote (and gets freed with it), but there is no way to duplicate the refspec (it is an opaque struct). AFAICT this requires an ownership mechanism, allowing the refspec to keep a handle on its owner remote so it doesn't get freed.

So I extended shouldDuplicate into ownedByThis: when ownedByThis is turned on we duplicate if the type has a dupFunction, otherwise we keep a handle on the owner.

srajko force-pushed the remote-leak-fix branch from d53ef9a to 416d47f Compare April 2, 2016 00:22
srajko force-pushed the remote-leak-fix branch from de19722 to f4c39d7 Compare April 7, 2016 16:59
Increase timeout, use a nodegit test repo, and pass oid instead of object returned by peel
srajko force-pushed the remote-leak-fix branch from c7109ed to 6580ecb Compare April 7, 2016 17:38

Copy link
Copy Markdown
Collaborator

Thanks @srajko!

johnhaley81 merged commit d912b6c into nodegit:master Apr 7, 2016
johnhaley81 deleted the remote-leak-fix branch April 7, 2016 20:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL