Title: calculating convenient patches locks files without autocrlf · Issue #877 · nodegit/nodegit · GitHub
Open Graph Title: calculating convenient patches locks files without autocrlf · Issue #877 · nodegit/nodegit
X Title: calculating convenient patches locks files without autocrlf · Issue #877 · nodegit/nodegit
Description: When calculating patches for a diff of the working directory, if autocrlf is unset or false, the libgit2 creates a file lock for all patches until the patches are freed. Unfortunately, @srajko and I were working on this issue today and u...
Open Graph Description: When calculating patches for a diff of the working directory, if autocrlf is unset or false, the libgit2 creates a file lock for all patches until the patches are freed. Unfortunately, @srajko and ...
X Description: When calculating patches for a diff of the working directory, if autocrlf is unset or false, the libgit2 creates a file lock for all patches until the patches are freed. Unfortunately, @srajko and ...
Opengraph URL: https://github.com/nodegit/nodegit/issues/877
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"calculating convenient patches locks files without autocrlf","articleBody":"When calculating patches for a diff of the working directory, if autocrlf is unset or false, the libgit2 creates a file lock for all patches until the patches are freed.\n\nUnfortunately, @srajko and I were working on this issue today and uncovered the fact that we are also not freeing objects that libgit 2 creates for us that libgit2 wants us to free. This means that when patches are created, even after the reference to the javascript object is GCd, the patch and associated handle exist out in heap land.\n\nDue to this problem, it is necessary that we specify in our descriptor objects that need to be freed in the GC process. I have a branch https://github.com/nodegit/nodegit/tree/free-raw-on-demand which begins the implementation of that. The branch also starts introducing the ability to free raw objects while in javascript.\n\nThe mechanisms for freeing the resources would also need to be templated out such that if we declare in javascript, free this object, the object should now return 'not allocated' errors or we should specify some other means of emptying the object.\n\nInterestingly enough, since this error affects patches, which are directly linked to the hunks of the diff, I am also proposing that we move the convenience classes for patches, lines, and hunks into a manual C++ template. The reasoning behind this is that at the time that patches are calculated, it is possible to transfer all of that data into a single object that is not locking any files via libgit2. This convenience wrapper would discard all libgit2 references and purely represent the diff data. This means that our convenience class can serve that data to javascript land faster and more conveniently.\n\nLooking for opinions.\n","author":{"url":"https://github.com/implausible","@type":"Person","name":"implausible"},"datePublished":"2016-01-22T00:32:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/877/nodegit/issues/877"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fbcc29ed-948f-bb11-fcc0-d9641047ef41 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D294:2F6564:2C76301:3EEFC3B:6A5F7E08 |
| html-safe-nonce | 43c4c2e9f92d546d76a6ddbcbae6bb49859cb2f38f635fcfb5b4a56911faf8e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjk0OjJGNjU2NDoyQzc2MzAxOjNFRUZDM0I6NkE1RjdFMDgiLCJ2aXNpdG9yX2lkIjoiNTQ5Mjk2NzE4NTY5NzQzOTI0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ffe55a3efafd530b625d3437d18b5f8d6a2fe8e5c00d8d17f7c0fb3757a5cf4c |
| hovercard-subject-tag | issue:128054335 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/nodegit/877/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7a869ca79c0916b4835b3f203e6042abd704513731c65387ceff801d143200fe/nodegit/nodegit/issues/877 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7a869ca79c0916b4835b3f203e6042abd704513731c65387ceff801d143200fe/nodegit/nodegit/issues/877 |
| og:image:alt | When calculating patches for a diff of the working directory, if autocrlf is unset or false, the libgit2 creates a file lock for all patches until the patches are freed. Unfortunately, @srajko and ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | implausible |
| hostname | github.com |
| expected-hostname | github.com |
| None | af0b892181d17ddf6fdffe74cdc67c01f4e6205e116d7b6df0e4b3e129ff9948 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0c55a5e833618f561722501a1bcba5c79dd95825 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width