Skip to content

Exposed filter_list; Fixed discard lines to use filters#1414

Merged
implausible merged 5 commits into
nodegit:masterfrom
cjhoward92:fix/discard-lines-insert-lf
Dec 20, 2017
Merged

Exposed filter_list; Fixed discard lines to use filters#1414
implausible merged 5 commits into
nodegit:masterfrom
cjhoward92:fix/discard-lines-insert-lf

Conversation

@cjhoward92
Copy link
Copy Markdown
Contributor

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.

@cjhoward92
Copy link
Copy Markdown
Contributor Author

@implausible If you could give this a look-see next week that would be swell.

@cjhoward92 cjhoward92 force-pushed the fix/discard-lines-insert-lf branch from 4ebf2ec to e2a740f Compare December 18, 2017 14:53
Copy link
Copy Markdown
Member

@implausible implausible left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dat newline

return NULL;
}
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newline please

Comment thread lib/repository.js
.then(function(content) {
originalContent = content;
if (filterList) {
filterList.free();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You think I should change it now just to be consistent?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I am pretty certain we're going to move away from our current garbage collection system.

@implausible implausible merged commit 443e3c4 into nodegit:master Dec 20, 2017
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