Exposed filter_list; Fixed discard lines to use filters#1414
Conversation
|
@implausible If you could give this a look-see next week that would be swell. |
4ebf2ec to
e2a740f
Compare
| return NULL; | ||
| } | ||
| } | ||
| } No newline at end of file |
| .then(function(content) { | ||
| originalContent = content; | ||
| if (filterList) { | ||
| filterList.free(); |
There was a problem hiding this comment.
My first inclination was to express how we shouldn't do this, and that we should strive to improve nodegit's automatic memory management... My second inclination was that we should really throw away the automatic memory management in nodegit and just expose the free methods on anything that needs freeing and leave memory management up to the consumer of nodegit. It's a little more cognitive on the programmer, but it is way more straightforward and potentially complete, compared to what we have now.
There was a problem hiding this comment.
You think I should change it now just to be consistent?
There was a problem hiding this comment.
No. I am pretty certain we're going to move away from our current garbage collection system.
Exposed the filter_list routines to apply filters to arbitrary files or data. Updated the discardLines routine in repository.js to use filters when they exist. This should create a more reliable output when discarding lines.